Oneboxed topic statistics are static


(Richard - DiscourseHosting.com) #1

The statistics in oneboxed topics are only correct at the time of the onebox creation. This causes pretty weird behaviour.

19 hours ago, zogstrip created a onebox of another topic. At that time, that other topic was 12 hours old. So the onebox showed that correctly. But the onebox is 19 hours old, so the oneboxed topic is 19+12 = 31 hours old at this moment.

It is pretty counterintuitive that these statistics are not updated. The number of posts, the amount of views, and the moment the last post was made can and will change. The only static bit of information is the moment of topic creation, and that is shown relatively (i.e. ‘12 hours ago’ instead of ‘Saturday April 6’) so that’s guaranteed to be incorrect.

The topic is here

http://meta.discourse.org/t/slightly-different-account-pages/5656

And you’ll see this onebox information being stuck on “last post 7 hours ago, created 20 hours ago”.


(Sam Saffron) #2

Agree, we need a job that walks through these posts and updates them.


(Jeff Atwood) #3

Don’t we have some other regular background tasks we could tie this to?


(Sam Saffron) #4

Nothing in particular but we could add one, we need to target all the posts that have local oneboxes and have not been updated in N days/hours.


(sparr) #5

Another option is a rule for onebox creation, “don’t include relative times in your oneboxes”. Simply giving a date and time would solve this problem.


(Jeff Atwood) #6

It would not, since the # of posts and views change as well.


(sparr) #7

There is a hierarchy of how likely information is to change. The time, as currently included, is guaranteed to become wrong. The number of posts and views will probably change, but not certainly. The content itself will probably not change, but could if the post is edited.

If a cron job completely re-creates oneboxes, we expose users to the possibility of “hotlink hilarity”, wherein the linked page changes substantially and even potentially maliciously.

Perhaps oneboxes should, by policy, be designed to only update information that cannot be arbitrarily changed by the publisher of the linked page?


(Jeff Atwood) #8

We basically solved this by not putting relative times or highly likely to change information in oneboxes, whenever possible.


(Jeff Atwood) #9