Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[UX, edge case] Atom feed <updated> time stamps
This may be a quirk or intended behavior, but there’s some strangeness in the Atom feed when articles are published in the future.
Steps to reproduce
- write an article, set the timestamp to the future
- view the Atom feed source and note the
<updated>[...]</updated>
time stamp on line 8 - wait until after the article has gone live
- view the Atom feed source and note the
<updated>[...]</updated>
time stamp on line 8 again
The time stamp in both cases corresponds to the time that Publish was clicked/tapped and doesn’t correspond to the actual time stamp of the article. Here’s the diff between the two Atom feeds:
16a17,31
> <name>Textpattern CMS Demo Account #10</name>
> </author>
> <published>2014-11-19T10:30:00Z</published>
> <updated>2014-11-19T10:26:06Z</updated>
> <title type="html">Upcoming article test</title>
> <link rel="alternate" type="text/html" href="http://release-demo.textpattern.co/index.php?id=2" />
> <id>tag:release-demo.textpattern.co,2014-11-19:379664a4e3c548a0e204819c30966915/b2f6c8c4c8e7ea16f6ff29034185080e</id>
>
>
> <summary type="html">
> <![CDATA[<p>Lorem.</p>]]>
> </summary>
> </entry>
> <entry>
> <author>
The changes relate to the new article, the <updated>[...]</updated>
outside the <entry>
block is unchanged. Atom readers that rely on that <updated>[...]</updated>
timestamp won’t update correctly.
Is this a bug or intended behaviour?
Last edited by gaekwad (2014-11-19 13:02:26)
Offline
Re: [UX, edge case] Atom feed <updated> time stamps
The <updated>
tag uses the article’s LastMod(ified) timestamp as its value. If you never click ‘update’ it won’t change. And if you’ve never updated the article, you’ll see the date at which you hit Publish, because lastmod defaults to ‘now’ for new articles.
If you’re publishing an article for future consumption, it’s highly unlikely you’ll be revisiting the article to manually update it when it’s due for publication so this is an unfortunate consequence of post-dating content.
I’m just trying to think through if there’s anything we can do about it, but I’m drawing a blank. If a visitor hits the atom feed at some time after the future-dated article becomes live, there’s no way we know that it used to be future-dated so we can’t apply some logic here to ignore the lastmod date and use the posted date.
The only way I can think of to get round it is to fudge the lastmod date on article save so it matches the posted date if the article is post-dated. That might have other ramifications though, such as articles appearing out of order on recent article lists.
Hmmmmmmmm…
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
Re: [UX, edge case] Atom feed <updated> time stamps
Yeah, it’s tricky. Edge case, clearly, but also the sort of thing that’s difficult to quantify in real world tests because each reader works differently. I don’t have any instances of a reader barfing on it, either, it was more a proof of concept after poking around in the source. I could conveniently forget about it, of course…
Offline
Re: [UX, edge case] Atom feed <updated> time stamps
Unless someone can figure out a clever way to handle this edge case, it might be best to employ the digital equivalent of sticking your fingers in your ears and going “La la la…”!
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
Re: [UX, edge case] Atom feed <updated> time stamps
Consider it done.
Offline