Last modified: 2012-08-04 20:49:00 UTC
Hi. An error happened in my wiki while trying to see the "diff" between an article's revisions. I'm using PostgreSQL. The error is related to an invalid timestamp format in the selection.
Here is the complete error message:
A database error has occurred Query: SELECT * FROM recentchanges WHERE rc_timestamp = '20080215154313' AND rc_this_oldid = '556' AND rc_last_oldid = '416' AND rc_patrolled = '0' Function: DifferenceEngine::showDiffPage Error: 1 ERROR: invalid input syntax for type timestamp with time zone: "20080215154313"
#0 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Database.php(779): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT * FROM...', 'DifferenceEngin...', false)
#1 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Database.php(1224): Database->query('SELECT * FROM...', 'DifferenceEngin...')
#2 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\RecentChange.php(100): Database->select('recentchanges', '*', Array, 'DifferenceEngin...')
#3 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\DifferenceEngine.php(177): RecentChange::newFromConds(Array, 'DifferenceEngin...')
#4 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Article.php(674): DifferenceEngine->showDiffPage(false)
#5 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Wiki.php(383): Article->view()
#6 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#7 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
What version of MediaWiki was this? Have you tried the latest subversion revision? Bugs related to this issue have been fixed, so it may have already been solved.
* MediaWiki: 1.11.1
* PHP: 5.2.2 (apache2handler)
* PostgreSQL: PostgreSQL 8.2.6 on x86_64--netbsd, compiled by GCC gcc (GCC) 3.3.3 (NetBSD nb3 20040520)
Still happens for me. This is the current release, but I don't keep up with the chages in-between releases.
These 'should' be fixed in the latest revisions, of which 1.11.2/1.12 are due soonish (according to #mediawiki)
I can confirm this bug still exists in 1.11.2
... and in a svn checkout of 1.12 :-(
I've been running svn version and I can say I've never an into this problem.
Worked fine for me since atleast r28000 or thereabouts whenever I installed it.
That is very odd, and unlikely to be a postgres version divergence since 'YYYYMMDDHHMMSS' as a numeric value has never been a valid timestamp with timezone value as far as I can tell, and I still get
Query failed: ERROR: invalid input syntax for type timestamp with time zone: "20080315022740" in /var/www/codex/site/includes/DatabasePostgres.php on line 506
I'm running off a svn checkout of R1_12 that's currently at r32018. Could it have been fixed in 1_11 and not in 1_12?
Running the 1.12 maintenance/update.php script (in 1_12 svn) apparently twiddled with the schema to fix it. It now works for me.