Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-08-28 10:42:06

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

Is there a cache or other recently introduced in 4.7 dev?

I have the following problem: in a form I use smd_xml to fill an html table.
The first time I open the page, I display all the content. But the next time I open the page (if I refreshed the page), I no longer display anything.

If at this time I add a dummy parameter to the url of the xml file (... xml?data=1) it works correctly once. I then change the url parameter so that it works again …

My solution is currently to add with PHP a unique id parameter. But that does not seem very smart …

Thanks for the help.

Last edited by jpdupont (2017-08-28 10:59:31)

Offline

#2 2017-08-28 11:02:02

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 3,914

Re: Is there a cache or other recently introduced in 4.7 dev?

I’m aware that this answer is extreme thin ice, maybe it can help, though. Somebody. Somehow. Your question reminded me of this problem here, that came up recently, and maybe yours can be solved by modifying the smd_xml plugin the way that ruud did it with yab_shop here, some posts downward that same topic.

Edit: stupid typo

Last edited by uli (2017-08-28 11:08:27)


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

Offline

#3 2017-08-28 11:20:18

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

Re: Is there a cache or other recently introduced in 4.7 dev?

Thanks for the answer, uli.

But in my settings “Send ‘Last-Modified’ header?” is already set to “No”

Offline

#4 2017-08-28 11:22:17

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 344
Website

Re: Is there a cache or other recently introduced in 4.7 dev?

It seems that the smd_xml plugin is double-escaping.

	// Store the current document in the cache and datestamp it
	if ($cache_time > 0 && !$read_cache) {
		$srcinfo = $crush ? base64_encode(gzcompress($src)) : doSlash($src);
		set_pref($var_lastmod, time(), 'smd_xml', PREF_HIDDEN, 'text_input');
		set_pref($var_data, $srcinfo, 'smd_xml', PREF_HIDDEN, 'text_input');
	}

function set_pref() already escaping all values.

IMHO, need to replace the

$srcinfo = $crush ? base64_encode(gzcompress($src)) : doSlash($src);

by

$srcinfo = $crush ? base64_encode(gzcompress($src)) : $src;

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#5 2017-08-28 12:15:03

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

Re: Is there a cache or other recently introduced in 4.7 dev?

makss wrote #306738:

It seems that the smd_xml plugin is double-escaping.

$srcinfo = $crush ? base64_encode(gzcompress($src)) : $src;...

I try this but same problem …

Offline

Board footer

Powered by FluxBB