Page MenuHomePhabricator

Fix en:Wikipedia_talk:Flow/Developer_test_page
Closed, ResolvedPublic

Description

en:Wikipedia_talk:Flow/Developer_test_page was deleted, restored (this straight restore worked fine as @Fram noted), recreated as wikitext, deleted again, then there was an attempt to restore.

The most recent undeletion attempt led to:

[67a438e3] 2015-11-04 18:49:37: Fatal exception of type "Flow\Exception\FlowException

See T122261: Come up with scenarios for deletion/undeletion of Flow boards and figure out how to handle them and T122262: Improve Flow deletion/undeletion resilience for follow up later.

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)
2015-11-04 18:49:37 mw1113 enwiki exception ERROR: [67a438e3] /w/index.php?title=Special:Undelete&action=submit   Flow\Exception\FlowException from line 76 of /srv/mediawiki/php-1.27.0-wmf.4/extensions/Flow/includes/BoardMover.php: Could not locate workflow for 48461710 {"exception_id":67a438e3"} 
[Exception Flow\Exception\FlowException] (/srv/mediawiki/php-1.27.0-wmf.4/extensions/Flow/includes/BoardMover.php:76) Could not locate workflow for 48461710
  #0 /srv/mediawiki/php-1.27.0-wmf.4/extensions/Flow/Hooks.php(1559): Flow\BoardMover->prepareMove(integer, Title)
  #1 /srv/mediawiki/php-1.27.0-wmf.4/includes/Hooks.php(204): FlowHooks::onArticleUndelete(Title, boolean, string, integer)
  #2 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUndelete.php(636): Hooks::run(string, array)
  #3 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUndelete.php(385): PageArchive->undeleteRevisions(array, boolean, string)
  #4 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUndelete.php(1655): PageArchive->undelete(array, string, array, boolean, User)
  #5 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUndelete.php(825): SpecialUndelete->undelete()
  #6 /srv/mediawiki/php-1.27.0-wmf.4/includes/specialpage/SpecialPage.php(384): SpecialUndelete->execute(NULL)
  #7 /srv/mediawiki/php-1.27.0-wmf.4/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
  #8 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(280): SpecialPageFactory::executePath(Title, RequestContext)
  #9 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(701): MediaWiki->performRequest()
  #10 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(506): MediaWiki->main()
  #11 /srv/mediawiki/php-1.27.0-wmf.4/index.php(41): MediaWiki->run()
  #12 /srv/mediawiki/w/index.php(3): include(string)
  #13 {main}
Mattflaschen-WMF set Security to None.

This will be easier if I get temporary admin access on my work account.

My idea for this (if @Jdforrester-WMF didn't already try this approach) is:

  1. Selectively undelete just the wikitext revisions (there is currently a wikitext page there, but I believe that should be fine).
  2. Move the page (which should now exist with only a wikitext history) to an archive, not leaving a redirect.
  3. Try again to undelete the Flow board.
In T117812#1858309, @Mattflaschen wrote:

This will be easier if I get temporary admin access on my work account.

My idea for this (if @Jdforrester-WMF didn't already try this approach) is:

  1. Selectively undelete just the wikitext revisions (there is currently a wikitext page there, but I believe that should be fine).
  2. Move the page (which should now exist with only a wikitext history) to an archive, not leaving a redirect.
  3. Try again to undelete the Flow board.

I tried this. I:

  1. Used https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Wikipedia_talk:Flow/Developer_test_page&rvprop=timestamp|user|comment|content&rvlimit=100 to check what the Flow revision was (only one had application/json).
  2. Restored all the other revisions. Moved those to https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:Flow/Developer_test_page/Archive_2&action=history .
  3. Tried to do a straight undelete of the Flow board.

Unfortunately, I got:

[686f85e1] 2015-12-17 02:30:20: Fatal exception of type "Flow\Exception\FlowException"

2015-12-17 02:30:20 mw1238 enwiki exception ERROR: [686f85e1] /w/index.php?title=Special:Undelete&action=submit   Flow\Exception\FlowException from line 76 of /srv/mediawiki/php-1.27.0-wmf.8/extensions/Flow/includes/BoardMover.php: Could not locate workflow for 41854369 {"exception_id":"686f85e1"} 
[Exception Flow\Exception\FlowException] (/srv/mediawiki/php-1.27.0-wmf.8/extensions/Flow/includes/BoardMover.php:76) Could not locate workflow for 41854369
  #0 /srv/mediawiki/php-1.27.0-wmf.8/extensions/Flow/Hooks.php(1627): Flow\BoardMover->prepareMove(integer, Title)
  #1 /srv/mediawiki/php-1.27.0-wmf.8/includes/Hooks.php(195): FlowHooks::onArticleUndelete(Title, boolean, string, integer)
  #2 /srv/mediawiki/php-1.27.0-wmf.8/includes/specials/SpecialUndelete.php(639): Hooks::run(string, array)
  #3 /srv/mediawiki/php-1.27.0-wmf.8/includes/specials/SpecialUndelete.php(385): PageArchive->undeleteRevisions(array, boolean, string)
  #4 /srv/mediawiki/php-1.27.0-wmf.8/includes/specials/SpecialUndelete.php(1657): PageArchive->undelete(array, string, array, boolean, User)
  #5 /srv/mediawiki/php-1.27.0-wmf.8/includes/specials/SpecialUndelete.php(827): SpecialUndelete->undelete()
  #6 /srv/mediawiki/php-1.27.0-wmf.8/includes/specialpage/SpecialPage.php(384): SpecialUndelete->execute(NULL)
  #7 /srv/mediawiki/php-1.27.0-wmf.8/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
  #8 /srv/mediawiki/php-1.27.0-wmf.8/includes/MediaWiki.php(280): SpecialPageFactory::executePath(Title, RequestContext)

It's looking for workflows with page ID 41854369. Indeed there are none (they're all 48099373).

As expected, ar_page_id matches that page ID above (though for some reason stat1003 is out of date here for the same query):

mysql:wikiadmin@db1065 [enwiki]> SELECT ar_page_id, ar_namespace, ar_title FROM archive WHERE ar_namespace = 5 AND ar_title = 'Flow/Developer_test_page';
+------------+--------------+--------------------------+
| ar_page_id | ar_namespace | ar_title                 |
+------------+--------------+--------------------------+
|   41854369 |            5 | Flow/Developer_test_page |
+------------+--------------+--------------------------+
1 row in set (0.00 sec)

The workflows:

mysql:research@x1-analytics-slave [flowdb]> SELECT HEX(workflow_id), workflow_namespace, workflow_page_id FROM flow_workflow WHERE workflow_wiki = 'enwiki' AND workflow_namespace = 5 AND workflow_title_text = 'Flow/Developer_test_page' LIMIT 10;
+------------------------+--------------------+------------------+
| HEX(workflow_id)       | workflow_namespace | workflow_page_id |
+------------------------+--------------------+------------------+
| 050FE6C09D00B4F1D8A884 |                  5 |         48099373 |
| 050FE71C2034D0411A9184 |                  5 |         48099373 |
| 051029140EF242C790E990 |                  5 |         48099373 |
| 05112730A88676DFC1D5FF |                  5 |         48099373 |
| 051D1D9AA847BC94A85E58 |                  5 |         48099373 |
| 051D9403D78D52BB4F309F |                  5 |         48099373 |
| 051DB0C1F5B2669F9A9C62 |                  5 |         48099373 |
| 051DB0F0C95985A9127C61 |                  5 |         48099373 |
| 051DB101F7BA613FB95771 |                  5 |         48099373 |
| 051E5D6463F8FF31F434C3 |                  5 |         48099373 |
+------------------------+--------------------+------------------+
10 rows in set (0.00 sec)

I think we could workaround it manually by changing the workflow_page_id to match the archive table, then undeleting again.

Let's discuss in standup or IRC.

Ran:

UPDATE flow_workflow SET workflow_page_id = 41854369 WHERE workflow_wiki = 'enwiki' AND workflow_namespace = 5 AND workflow_title_text = 'Flow/Developer_test_page' AND workflow_page_id = 48099373;

Worked-around (through above and then just doing a straight undelete).

Everything should be back to normal on that page.

See T122261: Come up with scenarios for deletion/undeletion of Flow boards and figure out how to handle them and T122262: Improve Flow deletion/undeletion resilience for followup.

  1. The page https://en.wikipedia.org/wiki/Wikipedia_talk:Flow/Developer_test_page seems to be working fine.
  2. Except for manual UPDATE there is still no way to restore deleted Flow page if a wiki page with the same name was created.
  3. T104591: Deleted wikitext Talk page cannot be restored after EnableFlow creates the same page still shows the same error as reported in this ticket. The scenario in that ticket :
    • create a wikitext page - Delete
    • via Special: EnableFlow create a page with the same title as deleted wikitext page above
    • Go to Special:Undelete - you'll see the page listed there
    • try Undelete - the above error is displayed.
  1. Two follow up tickets were filed by @Mattflaschen
  1. Except for manual UPDATE there is still no way to restore deleted Flow page if a wiki page with the same name was created.

I tested just now, and I was able to do so on the Beta Cluster following these steps:

  1. Special:EnableFlow to create Flow board
  2. Post topic
  3. Delete Flow board
  4. Create wikitext page with same page name
  5. Move wikitext page out of the way, not leaving redirect
  6. Undelete Flow board (leaving checkbox unchecked)

I wasn't able to restore the production case like this (you can see I tried something similar), probably because it had a more complex history, including but not limited to selective revision undeletion ("So, I deleted it once again, and restored every revision except my last one"). But simpler cases can be solved properly without touching the database shell.

Yes, the scenario you described allows to restore Flow page.

However, I've tested the scenario with deleting wikitext page not moving it.
So,

  1. Move wikitext page out of the way, not leaving redirect

was

  1. Delete wikitext page.

Then, Special:Undelete has only record about deleted wikitext page.

Catrope added a subscriber: Catrope.