Page MenuHomePhabricator

Wikimedia\Timestamp\ConvertibleTimestamp::setTimestamp: Invalid timestamp - -0001-12-30T23:50:39.000Z
Closed, ResolvedPublic


We ran into this error in T315510. Very rare, 12 hits in last 90 days:

Affects a single page on frwiki:édia:Oracle/semaine_9_2006 where some jokester wrote a comment with the timestamp "0 janvier 0000 à 00:00 (CET)" ;)

Event Timeline

When I try to reply to that comment (, there is a jQuery.Deferred exception stating that comment is null in setupController, and nothing happens (not even a user-visible error message). Is it also caused by a failing ConvertibleTimestamp::setTimestamp() call, or is it a different bug (although likely due to the unusual timestamp as well)? No matter how rare comments from the Ancient Rome ;) are, I think failing without informing the user is a bad thing. First I thought it just loads slowly due to the size of the page, until I tried to reply to another comment, which worked.

Change 972439 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/DiscussionTools@master] Notify when we can't find a comment from a reply-link

I documented a long time ago that DiscussionTools "only supports (…) dates when MediaWiki existed, let's say 2000 onwards", but I unfortunately didn't enforce that in the code :( I wonder if we could still change that.

There are many comments with weird dates.

select it_itemname from discussiontools_items where it_timestamp < '2000'

My favorite is the guy who posted in literally 1984 (and was blocked indefinitely later that day).

I think it’s useful to be able to reply to comments with joke signature dates. Instead of banning them, it’s better to allow them while failing gracefully (i.e. no logspam and no uncaught frontend exceptions if things don’t work out). Of course, you don’t need to put a lot of extra work in making sure that a comment dated 0 AD can be replied to, but the 1984 comment seems to work, so why not allow replying to it?

Change 972439 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Notify when we can't find a comment from a reply-link

ppelberg claimed this task.
ppelberg moved this task from Backlog to Triaged on the DiscussionTools board.
ppelberg subscribed.

I'm resolving this task considering:

  1. will suppress the error from being "emitted"
  2. We've filed T352455 to capture the work involved with handling the case that caused this error to emerge in the first place