Page MenuHomePhabricator

E11. Write maintenance script to populate page.page_content_model, revision.rev_content_*, archive.ar_content_*
Closed, ResolvedPublic

Description

Until $wgContentHandlerUseDB is set to true, page_content_model will be NULL. This prevents changing the default content model with $wgNamespaceContentModels because NULL will be interpreted with the new default instead of whatever the page actually is.

page_content_model, rev_content_model (I think just the last revision should be sufficient), ar_content_model all need to be populated.

Event Timeline

Legoktm created this task.Jun 22 2015, 5:35 PM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 22 2015, 5:35 PM

Should we also populate rev_content_model?

Catrope assigned this task to Legoktm.Jun 25 2015, 5:45 PM
Catrope set Security to None.
Legoktm renamed this task from Write maintenance script to populate page.page_content_model to Write maintenance script to populate page.page_content_model, revision.rev_content_*, archive.ar_content_*.Jun 26 2015, 11:01 PM

Change 221755 had a related patch set uploaded (by Legoktm):
[WIP] script to populate page,revision,archive.*_content_* fields

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

Hmm, so I just filed T104275: Write maintenance script to change page's content model not knowing that this task exists. Do we ultimately want two maintenance scripts here: one for populating the content model and one for bulk-changing content models? Or maybe T104275 should just be folded into this task?

Hmm, so I just filed T104275: Write maintenance script to change page's content model not knowing that this task exists. Do we ultimately want two maintenance scripts here: one for populating the content model and one for bulk-changing content models? Or maybe T104275 should just be folded into this task?

The maintenance script that we wrote for this task uses WHERE page_content_model IS NULL , FWIW.

Change 221755 merged by jenkins-bot:
Add maintenance script to populate page,revision,archive.*_content_* fields

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

Change 221981 had a related patch set uploaded (by Catrope):
Add maintenance script to populate page,revision,archive.*_content_* fields

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

Change 221982 had a related patch set uploaded (by Catrope):
Add maintenance script to populate page,revision,archive.*_content_* fields

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

Change 221981 merged by jenkins-bot:
Add maintenance script to populate page,revision,archive.*_content_* fields

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

Change 221982 merged by jenkins-bot:
Add maintenance script to populate page,revision,archive.*_content_* fields

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

DannyH renamed this task from Write maintenance script to populate page.page_content_model, revision.rev_content_*, archive.ar_content_* to E11. Write maintenance script to populate page.page_content_model, revision.rev_content_*, archive.ar_content_*.Jun 30 2015, 9:05 PM
Legoktm closed this task as Resolved.Jun 30 2015, 10:37 PM
Mattflaschen-WMF added a comment.EditedJul 7 2015, 3:10 AM

Hmm, so I just filed T104275: Write maintenance script to change page's content model not knowing that this task exists. Do we ultimately want two maintenance scripts here: one for populating the content model and one for bulk-changing content models? Or maybe T104275 should just be folded into this task?

The purpose of this script (T103388) is just to make the database store the current state (this is important because the defaults can change). Changing the state in response to a user or sysadmin request would be a different script.

Removing the blocked by's. It might be a blocker to T104278: E7. Run populateContentModel.php for page on all WMF wikis, but not to this one.