Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#229 2017-08-29 10:31:00

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 660
Website

Re: smd_xml : extract data from XML feeds

After updating textpattern to 4.6.2 from 4.5.7 i get this error:

Tag error: <txp:smd_xml cache_time="10" data="http://www.kliklak.net/livedatesrss/" record="item" fields="act, title, pubDate, link" format="pubDate|date|%d.%m.%Y" target_enc="UTF-8"> -> Textpattern Notice: unregistered_tag while parsing form default on page default

and

textpattern/lib/txplib_publish.php:518 trigger_error() textpattern/lib/txplib_publish.php:463 processTags() textpattern/publish/taghandlers.php:2846 parse() body() textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func() textpattern/lib/txplib_publish.php:514 Textpattern\Tag\Registry->process() textpattern/lib/txplib_publish.php:463 processTags() textpattern/lib/txplib_misc.php:4415 parse() textpattern/publish.php:1082 parse_form() textpattern/publish.php:1110 doArticle()

I tried reinstalling smd_xml (used 0.40 before and after) but the error remains. any idea, what this is?

thank you much in advance!

P.S. This message seems to be related, there was a Cpanel update on my server including a PHP upgrade, then downgrade back to 5.3 to keep old TXP installs alive.

Last edited by jayrope (2017-08-29 10:37:41)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#230 2017-08-29 10:42:39

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,260

Re: smd_xml : extract data from XML feeds

jayrope wrote #306761:

unregistered_tag

Try and download the latest version, maybe not from Stef’s page but from Stef’s GitHub. If this doesn’t help, please have a look here (first 2 links) and alter the plugin accordingly, maybe the other error is gone after fixing smd_xml.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#231 2017-08-29 12:07:17

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 660
Website

Re: smd_xml : extract data from XML feeds

Thank you, @Uli.
Stef’s github page was last updated in 2014, so i doubt there is news in that version.
Also i notice, that another domain i use smd_xml 0.40 on (same server, same provider) does not show that error.

And the solution on “this page” doesn’t mention, where to apply the additional tag registering code.

Can you guide me a little more?

Last edited by jayrope (2017-08-29 12:28:31)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#232 2017-08-29 12:47:00

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 660
Website

Re: smd_xml : extract data from XML feeds

I put the site from debugging into live mode and the error disappeared, naturally. However, maybe smd_xml only needs a minor update to stop us from posting this kind of stuff :) Thank you!


a hole turned upside down is a dome, when there’s also gravity.

Offline

#233 2017-08-29 13:03:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,562
Website GitHub

Re: smd_xml : extract data from XML feeds

Yeah, it’s only a warning. I’ll fix it in due course, sorry. For now, just above the function smd_xml($atts, thing=NULL) line, put this:

if (class_exists('\Textpattern\Tag\Registry')) {
	Txp::get('\Textpattern\Tag\Registry')
		->register('smd_xml')
		->register('smd_xml_if_prev')
		->register('smd_xml_if_next');
}

That should sort you out.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#234 2017-08-29 14:05:31

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 660
Website

Re: smd_xml : extract data from XML feeds

Thank you, Stef!


a hole turned upside down is a dome, when there’s also gravity.

Offline

#235 2017-08-29 15:42:26

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,260

Re: smd_xml : extract data from XML feeds

jayrope wrote #306767:

Also i notice, that another domain i use smd_xml 0.40 on (same server, same provider) does not show that error.

The TXP version was crucial for your type of error. Glad the patch fixed the other one, too.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#236 2017-08-29 16:16:24

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 660
Website

Re: smd_xml : extract data from XML feeds

The TXP version was crucial for your type of error. Glad the patch fixed the other one, too.

Oh no, that was a misunderstanding. Both sites run 4.6.2 and smd_xml 0.40, just one of them was just updated before. Both show the error in debugging mode but not in live mode.


a hole turned upside down is a dome, when there’s also gravity.

Offline

#237 2017-12-10 21:10:39

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: smd_xml : extract data from XML feeds

Erreur lors du chargement du plugin : smd_xml -> 8192: Methods with the same name as their class will not be constructors in a future version of PHP; smd_xml_build_data has a deprecated constructor on line 639

Could your give me some tips to avoid/correct this error ? Thanks !

Offline

#238 2018-09-09 08:08:41

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: smd_xml : extract data from XML feeds

I come back with this error that remains on my sites after correcting all other errors related to unregistered plugins.

smd_xml -> 8192: Methods with the same name as their class will not be constructors in a future version of PHP; smd_xml_build_data has a deprecated constructor on line 725
// Build an XML data set from associative array
class smd_xml_build_data
{
	private $xml, $last_idx, $recWrap;

	function smd_xml_build_data ($data, $startElement, $recWrap, $xml_version = '1.0', $xml_encoding = 'UTF-8')
	{

I would like a site without errors in debug mode, and this one annoys me. “Methods with the same name as their class will not be constructors in a future version of PHP” : What will happen to my sites using this plugin, when PHP will impose what it says in this warning?

Offline

#239 2018-09-09 08:18:02

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: smd_xml : extract data from XML feeds

Maybe use of etc_query ???

Offline

#240 2018-09-09 19:02:48

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,186
Website

Re: smd_xml : extract data from XML feeds

That’s just a warning for now. I noted it as an issue on GitHub a few months back. Try changing the name of the function within the class to __construct like this:

// Build an XML data set from associative array
class smd_xml_build_data
{
	private $xml, $last_idx, $recWrap;

	function __construct($data, $startElement, $recWrap, $xml_version = '1.0', $xml_encoding = 'UTF-8')
	{

You can see that has already been done for the other class in the plugin on lines 849 and 867 of the plugin.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB