Last modified: 2010-05-15 15:59:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 11992 - Internal Error when trying to show differences of a page
Internal Error when trying to show differences of a page
Status: RESOLVED DUPLICATE of bug 11331
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.11.x
All Linux
: Normal blocker (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-15 19:11 UTC by Dieter
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dieter 2007-11-15 19:11:30 UTC
We are using POSTGRES for our wiki.

When we like to see the differences of one page we receive a internal error like:

A database error has occurred Query: SELECT * FROM recentchanges WHERE rc_timestamp = '20071115153759' AND rc_this_oldid = '2698' AND rc_last_oldid = '2601' AND rc_patrolled = '0' Function: DifferenceEngine::showDiffPage Error: 1 FEHLER: ungültige Eingabesyntax für Typ timestamp with time zone: »20071115153759«

Backtrace:

#0 /srv/www/htdocs/wiki/includes/Database.php(779): DatabasePostgres->reportQueryError('FEHLER: ung??l...', 1, 'SELECT * FROM...', 'DifferenceEngin...', false)
#1 /srv/www/htdocs/wiki/includes/Database.php(1224): Database->query('SELECT * FROM...', 'DifferenceEngin...')
#2 /srv/www/htdocs/wiki/includes/RecentChange.php(100): Database->select('recentchanges', '*', Array, 'DifferenceEngin...')
#3 /srv/www/htdocs/wiki/includes/DifferenceEngine.php(177): RecentChange::newFromConds(Array, 'DifferenceEngin...')
#4 /srv/www/htdocs/wiki/includes/Article.php(674): DifferenceEngine->showDiffPage(false)
#5 /srv/www/htdocs/wiki/includes/Wiki.php(383): Article->view()
#6 /srv/www/htdocs/wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#7 /srv/www/htdocs/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#8 {main}

When I change the first parameter of wfTimestamp() in Revision:getTimestamp() from TS_MW to TS_POSTGRES everything works fine.

As I know, that changing Revision.php might make problems during the next update, I'd like to know what the correct solution would be.

Thanks

Dieter
Comment 1 Dieter 2007-11-15 20:49:36 UTC
Me again,

I had another problem with the combination of MediaWiki 1.11.0 und Postgres:

When we wanted to delete a unused image, we received internal errors as well:

A database error has occurred Query: INSERT INTO filearchive (fa_storage_group,fa_storage_key,fa_deleted_user,fa_deleted_timestamp,fa_deleted_reason,fa_deleted,fa_name,fa_archive_name,fa_size,fa_width,fa_height,fa_metadata,fa_bits,fa_media_type,fa_major_mime,fa_minor_mime,fa_description,fa_user,fa_user_text,fa_timestamp) SELECT 'deleted',IF(img_sha1='', '', CONCAT(img_sha1,'.png')),'2','2007-11-15 21:12:29 GMT','',0,img_name,NULL,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_description,img_user,img_user_text,img_timestamp FROM image WHERE img_name = 'Icon.produkt.png' Function: LocalFileDeleteBatch::doDBInserts Error: 1 FEHLER: Funktion concat(text, "unknown") existiert nicht HINT: Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.

Backtrace:

#0 /srv/www/htdocs/wiki/includes/Database.php(779): DatabasePostgres->reportQueryError('FEHLER: Funkti...', 1, 'INSERT INTO fi...', 'LocalFileDelete...', false)
#1 /srv/www/htdocs/wiki/includes/Database.php(1845): Database->query('INSERT INTO fi...', 'LocalFileDelete...')
#2 /srv/www/htdocs/wiki/includes/filerepo/LocalFile.php(1216): Database->insertSelect('filearchive', 'image', Array, Array, 'LocalFileDelete...')
#3 /srv/www/htdocs/wiki/includes/filerepo/LocalFile.php(1297): LocalFileDeleteBatch->doDBInserts()
#4 /srv/www/htdocs/wiki/includes/filerepo/LocalFile.php(873): LocalFileDeleteBatch->execute()
#5 /srv/www/htdocs/wiki/includes/FileDeleteForm.php(75): LocalFile->delete('')
#6 /srv/www/htdocs/wiki/includes/ImagePage.php(491): FileDeleteForm->execute()
#7 /srv/www/htdocs/wiki/includes/Wiki.php(397): ImagePage->delete()
#8 /srv/www/htdocs/wiki/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(ImagePage), Object(Title), Object(User), Object(WebRequest))
#9 /srv/www/htdocs/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#10 {main}

With changing the LocalFile.php I could manage to overcome the problem:

 if ( $deleteCurrent ) {
                        $where = array( 'img_name' => $this->file->getName() );
                        $dbw->insertSelect( 'filearchive', 'image',
                                array(
                                        'fa_storage_group' => $encGroup,
                                        'fa_storage_key'   => "CASE WHEN img_sha1 = '' THEN '' ELSE img_sha1 || $encExt END",

                                        'fa_deleted_user'      => $encUserId,
                                        'fa_deleted_timestamp' => $encTimestamp,
                                        'fa_deleted_reason'    => $encReason,
                                        'fa_deleted'               => 0,

                                        'fa_name'         => 'img_name',
                                        'fa_archive_name' => 'NULL',
                                        'fa_size'         => 0,
                                        'fa_width'        => 0,
                                        'fa_height'       => 0,
                                        'fa_metadata'     => 'img_metadata',
                                        'fa_bits'         => 0,
                                        'fa_media_type'   => 'img_media_type',
                                        'fa_major_mime'   => 'img_major_mime',
                                        'fa_minor_mime'   => 'img_minor_mime',
                                        'fa_description'  => 'img_description',
                                        'fa_user'         => 'img_user',
                                        'fa_user_text'    => 'img_user_text',
                                        'fa_timestamp'    => 'img_timestamp'
                                ), $where, __METHOD__ );
                }
Comment 2 wikilexw 2007-11-16 10:42:08 UTC
Both errors (version difference and file deletion) have already been solved under bug report nr 11331.
Comment 3 wikilexw 2007-11-16 10:46:53 UTC

*** This bug has been marked as a duplicate of bug 11331 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links