Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-24 19:59:08

zeeforel
Member
From: Nieuwerkerk a/d IJssel, NL
Registered: 2004-10-16
Posts: 92
Website

Trouble with Txp:posted

Hi to you all out here,

Maybe some can help me with the following riddle:

On one single page the tag Txp:posted is called twice:
+ once through the Single form like in <txp:article form=“Single” />
+ and once directly via Txp:posted

The first “call” gives the correct date, being the date/time the article was posted. However, and that’s my riddle, the second one gives the current date/time. Isn’t that strange?

Is this a bug? I searched the bug list but could not find anything.

Many thanks in advance for helping me!

Best regards,
Marcel

Offline

#2 2006-09-24 20:24:14

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Trouble with Txp:posted

Offline

#3 2006-09-24 21:28:29

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Trouble with Txp:posted

zeeforel wrote:

On one single page the tag Txp:posted is called twice:
+ once through the Single form like in <txp:article form="Single" />
+ and once directly via Txp:posted

Where is that second <txp:posted /> tag?

Last edited by els (2006-09-24 21:28:45)

Offline

#4 2006-09-25 06:23:26

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: Trouble with Txp:posted

txp:posted returns the current time if it is mistakenly used outside of an article context (this is a side effect of how txp:posted accounts for DST settings).

Txp 4.0.4 issues a warning whenever article related tags are used without a proper context, Txp 4.0.3 holds its tongue.

Offline

#5 2006-09-25 09:47:37

zeeforel
Member
From: Nieuwerkerk a/d IJssel, NL
Registered: 2004-10-16
Posts: 92
Website

Re: Trouble with Txp:posted

Thanks to all people reacting to my question so far.

I think that the pointer of Wet describes exactly what is happening. The archive page template calls <txp:article form=“Single” />, in which the Single form produces the correct outcome for the date, while at the same time on the archive page txp:posted is called outside the article context.

So what can I do? Two options:
+ delete the second one (breaking my design)
+ or bring the second one into the Single form..

Still need to figure this one out. I thought just using a prefab template (http://erraticwisdom.com/demo/connections/) would be easy….

Thanks again.

Offline

Board footer

Powered by FluxBB