Moving wikitext page into Flow occupied namespace immediately breaks it due to default content model changing
Closed, ResolvedPublic

Description

This means a one-time script run won't 100% solve this.

Mattflaschen-WMF updated the task description. (Show Details)
Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF assigned this task to Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 9 2015, 12:19 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJul 9 2015, 12:20 AM
Mattflaschen-WMF triaged this task as Unbreak Now! priority.Jul 9 2015, 12:22 AM

Yep, caused by rMWa5bc9f49cd01: Revision: Interpret a NULL rev_content_model as the default model. Previously NULL meant the page's content model, which would still be set to wikitext. But now that it refers to the default, everything breaks, because page moves have the ability to change what the default model is. So, when a page is moved, we need to see if it changes the default content model, and if so update the revisions accordingly.

Legoktm renamed this task from Moving wikitext page into Flow occupied namespace immediately breaks it to Moving wikitext page into Flow occupied namespace immediately breaks it due to default content model changing.Jul 10 2015, 5:13 AM
Legoktm edited projects, added MediaWiki-ContentHandler; removed StructuredDiscussions.
Legoktm set Security to None.

Change 226938 had a related patch set uploaded (by Legoktm):
Populate rev_content_model when a move causes default content model to change

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

Change 226938 merged by jenkins-bot:
Populate rev_content_model when a move causes default content model to change

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

Talk:ET36 in testwik had page_id=969 before conversion:

MariaDB [testwiki]> select rev_id, rev_page, rev_comment, rev_user, rev_user_text, rev_timestamp, rev_content_format, rev_content_model from revision where rev_page  in (969)\G
*************************** 1. row ***************************
            rev_id: 2008
          rev_page: 969
       rev_comment: Created page with "{{#useliquidthreads:1}}"
          rev_user: 285
     rev_user_text: Etonkovidova
     rev_timestamp: 20150730180556
rev_content_format: NULL
 rev_content_model: NULL
1 row in set (0.00 sec)

After conversion - page_id=978

MariaDB [testwiki]> select rev_id, rev_page, rev_comment, rev_user, rev_user_text, rev_timestamp, rev_content_format, rev_content_model from revision where rev_page=978\G
*************************** 1. row ***************************
            rev_id: 2039
          rev_page: 978
       rev_comment: /* Taken over by Flow */
          rev_user: 377
     rev_user_text: Flow talk page manager
     rev_timestamp: 20150731170223
rev_content_format: application/json
 rev_content_model: flow-board
*************************** 2. row ***************************
            rev_id: 2040
          rev_page: 978
       rev_comment: /* Taken over by Flow */
          rev_user: 377
     rev_user_text: Flow talk page manager
     rev_timestamp: 20150731170224
rev_content_format: application/json
 rev_content_model: flow-board
2 rows in set (0.01 sec)

The page is displayed correctly.

This is not regarding LiquidThreads. It's about moving (using the Move link in the drop-down menu in the tabs bar) a normal wikitext page into an occupied namespace.

For example, you could create a page in the main namespace on English Wikipedia Beta, then move it to any title in the Flow_test_talk namespace.

It should remain a normal fully functioning wikitext page, despite the new namespace.

DannyH closed this task as Resolved.Aug 3 2015, 5:02 PM
DannyH moved this task from Product Review to Done on the Collaboration-Team-Archive-2015-2016 board.
DannyH added a subscriber: DannyH.