Page MenuHomePhabricator

Error: 1146 Table 'valid_tag' doesn't exist when upgrading from an ancient MediaWiki version
Closed, ResolvedPublic

Description

When upgrading from an ancient MediaWiki version (1.12) the update.php script fails with the error:

An error occurred:
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT  vt_tag AS `value`  FROM `valid_tag`     
Function: PopulateChangeTagDef::setUserDefinedTags
Error: 1146 Table 'wikidb.valid_tag' doesn't exist (localhost)

The valid_tag table was added in 1.15 and removed in 1.33: https://www.mediawiki.org/wiki/Manual:Valid_tag_table

Apparently, a script is running to migrate the data from that table to other tables before removing it, but that table doesn't exist in the first place. This means installations upgrading from a version before 1.15 will fail.

Reports of this error in the Support Desk:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMon, Aug 12, 9:39 AM
Ciencia_Al_Poder renamed this task from Error: 1146 Table 'wikidb.valid_tag' doesn't exist when upgrading from an ancient MediaWiki version to Error: 1146 Table 'valid_tag' doesn't exist when upgrading from an ancient MediaWiki version.Mon, Aug 12, 9:40 AM
Ladsgroup triaged this task as Lowest priority.Mon, Aug 12, 11:04 AM

1.12 was released in February 2009, more than 10 years ago. Upgrading in one go from that version to 1.33 is bound to have issues. You can upgrade from 1.12 to 1.16 first and then upgrade to 1.33. That would fix this issue.

Anomie added a subscriber: Anomie.

Also easy enough to work around, though.

Change 530173 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530173

Change 530173 merged by jenkins-bot:
[mediawiki/core@master] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530173

Anomie closed this task as Resolved.Wed, Aug 14, 7:29 PM
Anomie claimed this task.

Change 530325 had a related patch set uploaded (by Jforrester; owner: Anomie):
[mediawiki/core@REL1_33] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530325

Change 530325 merged by jenkins-bot:
[mediawiki/core@REL1_33] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530325