Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-26 10:03:40

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Live Articles 404'ing (Again)

Hi,

I had this problem previously (Live Articles 404’ing, suspect it is due to Time Zone & Permalink mode) but we never really found a concrete answer. The URLs were not in listed on the site anywhere and I suspect they were wrong initially. Case closed.

However, this time it really is happening and I’m super confused. If you take a look at poshcss.com – Upon clicking on the title of the first entry you get the 404 page. Why would that be?

Further details, this is the URL that is 404’ing:
poshcss.com/2009/11/26/eating-accessibility-humble-pie

However, visiting poshcss.com/2009/11/25/eating-accessibility-humble-pie works fine. I got this latter URL by checking the `Posted` time in the database which is 2009-11-25 20:11:00, likewise `feed_time` is 2009-11-25.

My Textpattern setup is set to Time Zone London, Auto DST is On. I believe my local time is 7 hours ahead of the local server time if that helps.

Help appreciated.
-Sam

Last edited by Sam (2009-11-26 10:17:43)

Offline

#2 2009-11-26 10:16:04

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Live Articles 404'ing (Again)

Please, could you provide:

  1. High Diagnostics.
  2. Results for what <txp:posted /> returns for an article and what is the time stored inside database (Posted field).
  3. Tag trace from linking article list page and individual article page.

Offline

#3 2009-11-26 10:38:37

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: Live Articles 404'ing (Again)

Here you go Jukka, I hope this helps:

  1. High Diagnostics
  2. <txp:posted /> returns 2009-11-26 04:11 – The database returns 2009-11-25 20:11:00
  3. Tag Trace for linking article list page | Tag Trace for individual article page

Offline

#4 2009-11-26 10:42:31

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Live Articles 404'ing (Again)

At line 2815 in taghandlers.php (4.2.0) the permlink is build using date("Y-m-d",$posted). Which will follow possible timezone settings applied. But the date in the DB uses time without extra preferences applied by user. In some cases this will cause different dates.

Fix is to use $posted with out the date() function, so we get the info straight out of DB.

Offline

#5 2009-11-26 10:45:46

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: Live Articles 404'ing (Again)

That makes sense, well spotted.

So this is a bug? Is there anything I can do in the mean time to fix it?

Last edited by Sam (2009-11-26 10:49:47)

Offline

#6 2009-11-26 11:02:04

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: Live Articles 404'ing (Again)

Sam wrote:

So this is a bug? Is there anything I can do in the mean time to fix it?

Looks like a bug. The easiest and quickest way to temporarily fix it would be to change the time stored in the database to the 26th.

Offline

#7 2009-11-26 11:42:37

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: Live Articles 404'ing (Again)

Gocom wrote:

Fix is to use $posted with out the date() function, so we get the info straight out of DB.

I’ve tried to reproduce this… $posted is a unix timestamp and not a nicely formatted time. But I reckon changing line 2815 to list($y, $m, $d) = explode("-", safe_strftime("%Y-%m-%d", $posted)); might fix this. But comparing the timezone settings in the diagnostics to what is happening doesn’t match so there might be something else going on here.

Offline

#8 2009-12-01 11:18:19

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: Live Articles 404'ing (Again)

:( This bug is killing me. Is there, for lack of a better expression, an official fix?

Offline

Board footer

Powered by FluxBB