Page MenuHomePhabricator

Until Flow pages can be moved, prevent someone from trying
Closed, ResolvedPublic

Description

I was tidying up (problem one) on mw.org.

There's a new BF going out. The page about the feature was at mw:Wikibase/Beta_Features/Other_projects_sidebar

I moved it to mw:Beta_Features/Other_projects_sidebar

I also moved the Talk: page, which was flowified.

Apparently that's not OK.

Please don't let me do that again. :) Erroring out or something.


Version: unspecified
Severity: normal

Details

Reference
bz66891

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:26 AM
bzimport set Reference to bz66891.
bzimport added a subscriber: Unknown Object (MLST).

Yes, Flow should block moving a Flow board in the AbortMove hook since the board's header and topics don't follow the move. Details follow.

Flow blocks most page actions, but move is handled by DB updates within Special:MoveTo. Moving a Flow board to a new page name appears to succeed. But $wgFlowOccupyPages still tells Flow to occupy the old page name. (If you checked [Leave a redirect behind], Flow occupies the page despite page.page_is_redirect being true.)

The page "content" is at the new page name, but it is just the placeholder text "This talk page has been taken over by a _Flow board_.", and the new page probably isn't a Flow board.

Even if you enable Flow on the new page, the board header and any topics are still associated with the old page name in Flow DB tables, so they don't appear on the new Flow board name. If you disable Flow on the old page name, you can't access its items, even if you use their Permalinks URLs

The temporary fix is for Flow to hook AbortMove and return false and an err message if the page is Flow-enabled, (as e.g. EducationProgram.hooks.php does). This may change when a Flow board uses ContentHandler, since Title->isValidMoveOperation() already has checks for changing content model.

To actually support page moves, Flow could hook TitleMoveComplete and update the Flow items in its database to associate them with the new board name (update flow_workflow.workflow_page_id ?).

Change 155262 had a related patch set uploaded by Matthias Mullie:
(bug 66891) Disallow moving a talk page

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

Change 155262 merged by jenkins-bot:
(bug 66891) Disallow moving a Flow board

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