Topic on Project:Support desk

EinhornMitNashorn (talkcontribs)

Hi,

I can't save pages. Every time this error occur:

[695a8e7bad30ad3277ac210a] /index.php?title=PAGENAME&action=submit Wikimedia\Rdbms\DBQueryError from line 1457 of /w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: INSERT INTO `text` (old_id,old_text,old_flags) VALUES (NULL,' fb','utf-8')
Function: MediaWiki\Storage\SqlBlobStore::storeBlob
Error: 1048 Column 'old_id' cannot be null (localhost)
Backtrace:
#0 /w/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
#1 /w/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /w/includes/libs/rdbms/database/Database.php(1966): Wikimedia\Rdbms\Database->query(string, string)
#3 /w/includes/Storage/SqlBlobStore.php(242): Wikimedia\Rdbms\Database->insert(string, array, string)
#4 /w/includes/Storage/RevisionStore.php(377): MediaWiki\Storage\SqlBlobStore->storeBlob(string, array)
#5 /w/includes/Revision.php(1123): MediaWiki\Storage\RevisionStore->insertRevisionOn(MediaWiki\Storage\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli)
#6 /w/includes/page/WikiPage.php(1922): Revision->insertOn(Wikimedia\Rdbms\DatabaseMysqli)
#7 /w/includes/page/WikiPage.php(1676): WikiPage->doCreate(WikitextContent, integer, User, string, array)
#8 /w/includes/EditPage.php(2214): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User, string, array, integer)
#9 /w/includes/EditPage.php(1506): EditPage->internalAttemptSave(array, boolean)
#10 /w/includes/EditPage.php(652): EditPage->attemptSave(array)
#11 /w/includes/actions/EditAction.php(60): EditPage->edit()
#12 /w/includes/actions/SubmitAction.php(38): EditAction->show()
#13 /w/includes/MediaWiki.php(500): SubmitAction->show()
#14 /w/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#15 /w/includes/MediaWiki.php(861): MediaWiki->performRequest()
#16 /w/includes/MediaWiki.php(524): MediaWiki->main()
#17 /w/index.php(42): MediaWiki->run()
#18 {main}

When I try to run mw-config another error occur:

Turning off Content Handler DB fields for this part of upgrade.
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...already have interwiki table
...indexes seem up to 20031107 standards.
...have rc_type field in recentchanges table.
...index new_name_timestamp already set on recentchanges table.
...have user_real_name field in user table.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...have pagelinks; skipping old links table updates
...il_from OK
...have rc_ip field in recentchanges table.
...index PRIMARY already set on image table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...logging table already exists.
...have user_token field in user table.
...have wl_notificationtimestamp field in watchlist table.
...watchlist talk page rows already present.
...user table does not contain user_emailauthenticationtimestamp field.
...page table already exists.
...have log_params field in logging table.
...logging table has correct log_title encoding.
...have ar_rev_id field in archive table.
...have page_len field in page table.
...revision table does not contain inverse_timestamp field.
...have rev_text_id field in revision table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have user_email_token field in user table.
...have ar_text_id field in archive table.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...have img_media_type field in image table.
...already have pagelinks table.
...image table does not contain img_type field.
...already have unique user_name index.
...user_groups table exists and is in current format.
...have ss_total_pages field in site_stats table.
...user_newtalk table already exists.
...transcache table already exists.
...have iw_trans field in interwiki table.
...wl_notificationtimestamp is already nullable.
...index times already set on logging table.
...have ipb_range_start field in ipblocks table.
...no page_random rows needed to be set
...have user_registration field in user table.
...templatelinks table already exists
...externallinks table already exists.
...job table already exists.
...have ss_images field in site_stats table.
...langlinks table already exists.
...querycache_info table already exists.
...filearchive table already exists.
...have ipb_anon_only field in ipblocks table.
...index rc_ns_usertext already set on recentchanges table.
...index rc_user_text already set on recentchanges table.
...have user_newpass_time field in user table.
...redirect table already exists.
...querycachetwo table already exists.
...have ipb_enable_autoblock field in ipblocks table.
...index pl_namespace on table pagelinks includes field pl_from.
...index tl_namespace on table templatelinks includes field tl_from.
...index il_to on table imagelinks includes field il_from.
...have rc_old_len field in recentchanges table.
...have user_editcount field in user table.
...page_restrictions table already exists.
...have log_id field in logging table.
...have rev_parent_id field in revision table.
...have pr_id field in page_restrictions table.
...have rev_len field in revision table.
...have rc_deleted field in recentchanges table.
...have log_deleted field in logging table.
...have ar_deleted field in archive table.
...have ipb_deleted field in ipblocks table.
...have fa_deleted field in filearchive table.
...have ar_len field in archive table.
...have ipb_block_email field in ipblocks table.
...index cl_sortkey on table categorylinks includes field cl_from.
...have oi_metadata field in oldimage table.
...index usertext_timestamp already set on archive table.
...index img_usertext_timestamp already set on image table.
...index oi_usertext_timestamp already set on oldimage table.
...have ar_page_id field in archive table.
...have img_sha1 field in image table.
...protected_titles table already exists.
...have ipb_by_text field in ipblocks table.
...page_props table already exists.
...updatelog table already exists.
...category table already exists.
...category table already populated.
...have ar_parent_id field in archive table.
...have user_last_timestamp field in user_newtalk table.
...protected_titles table has correct pt_title encoding.
...have ss_active_users field in site_stats table.
...ss_active_users user count set...
...have ipb_allow_usertalk field in ipblocks table.
...change_tag table already exists.
...tag_summary table already exists.
...valid_tag table already exists.
...user_properties table already exists.
...log_search table already exists.
...have log_user_text field in logging table.
...l10n_cache table already exists.
Adding index change_tag_rc_tag to table change_tag ...
An error occurred:
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: DROP INDEX ct_rc_id ON `change_tag`
Function: Wikimedia\Rdbms\Database::sourceFile( /w/maintenance/archives/patch-change_tag-indexes.sql )
Error: 1091 Can't DROP 'ct_rc_id'; check that column/key exists (localhost)
Purging caches...done.

Is there a solution for that?

Thank you :-)

EinhornMitNashorn (talkcontribs)

I use these versions:

Software Version
MediaWiki 1.31.0
PHP 7.2.9 (fpm-fcgi)
MariaDB 10.0.36-MariaDB-0+deb8u1
ICU 52.1
MarkAHershberger (talkcontribs)

An easy fix, I think, would be to add the index ct_rc_id to the change_tag column and then re-run the config.

Do you need help doing that? Do you have access to your DB via phpmyadmin or the command line?

EinhornMitNashorn (talkcontribs)

I tried it with the query ALTER TABLE `change_tag` ADD INDEX `ct_rc_id` (`ct_rc_id`), but unfortunately the error still occur. :-(

EinhornMitNashorn (talkcontribs)

I resolved it with a backup of my MySQL database. Thank you :-)