Page MenuHomePhabricator

Update from 1.19 to 1.23 fails: Error: 1054 Unknown column 'page_content_model' in 'field list'.
Closed, DuplicatePublic


From Support Desk:

Hi. I am having problems upgrading my mediawiki instance. SO far I have: replaced all files with 1.23.7 files,
added back a couple of custom lines for auth, upgraded all extensions to 1.23 and removed unsupported ones
and then tried to run php update.php. The script connects and then fails shorty afterward on
Error: 1054 Unknown column 'page_content_model' in 'field list'. Does anyone know where this table gets created?

And this reply:

Sorry, I don't know. But you at least are not the first and only person, who has this problem. I found a number of hits
for this problem on Google. Maybe they bring you to the right idea?

Link from reply:

Event Timeline

MarkAHershberger claimed this task.
MarkAHershberger raised the priority of this task from to Needs Triage.
MarkAHershberger updated the task description. (Show Details)
MarkAHershberger changed Security from none to None.
MarkAHershberger added a subscriber: Mglaser.
MarkAHershberger added a subscriber: MarkAHershberger.
Krinkle removed a subscriber: Ciencia_Al_Poder.
Krinkle added a subscriber: Ciencia_Al_Poder.
Aklapper renamed this task from Update to latest LTS fails to Update to latest LTS fails: Error: 1054 Unknown column 'page_content_model' in 'field list'..Feb 6 2015, 12:14 PM
Aklapper renamed this task from Update to latest LTS fails: Error: 1054 Unknown column 'page_content_model' in 'field list'. to Update from 1.19 to 1.23 fails: Error: 1054 Unknown column 'page_content_model' in 'field list'..
Aklapper triaged this task as Low priority.

Did anyone ask the original reporter for installed extensions?

Found T62492 (but DPL seems to be not involved here). T59335 mentions some other extensions.
Also see

Krinkle added a subscriber: Krinkle.

Error: 1054 Unknown column page_content_model in 'field list'

This is a MySQL error number and the task reported upgrading from MediaWiki 1.19 to 1.23.

The page_content_model field however is part of the updater.

	// 1.21
	// ..
	[ 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ],

Looking for other reports via Google:

  • "[RESOLVED] upgrade from 1.16.1 to 1.21.1 failing"
    • Running update.php from command-line failed. Uninstalling DPL solved the issue. Using the web updater also worked (with DPL installed).
  • "[RESOLVED] Database error in upgrading from 1.18 to 1.22"
    • The error comes from WikiPage or LinkCache. This suggests something is trying to create a page using the current MediaWiki source code before the updater runs. Core's own logic for that (e.g. createSysop, createMainpage etc.) always run after the schema updates for this reason. Perhaps the DPL extension tries to do it before hand and fails because WikiPage assumes the schema to be up to date.

Looking at the DynamicPageList extension source code, I found the culprit. commonSetup() tried to create Template:Extension DPL during the initialisation of the source code. This was fixed by @MarkAHershberger in rEDPLd9cd11826ef3: Don't check for Template:Extension_DPL during update - landed in master for 1.24 and backported to REL1_22 and REL1_23.

Closing as resolved.