Page MenuHomePhabricator

Deleted wikitext Talk page cannot be restored after EnableFlow creates the same page
Closed, ResolvedPublic

Description

In beta on cawiki

  1. Created a new Talk:ET10 with simple wikitext --
  2. MariaDB [cawiki]> select page_id, page_namespace, page_title, page_content_model from page where page_title like 'ET10' and page_namespace=1;
select page_id,page_namespace, page_title, page_content_model from page where page_title like 'ET10' and page_namespace=1;
+---------+----------------+------------+--------------------+
| page_id | page_namespace | page_title | page_content_model |
+---------+----------------+------------+--------------------+
|   23630 |              1 | ET10       | wikitext        |
+---------+----------------+------------+--------------------+
  1. Delete page_id 23630
MariaDB [cawiki]> select ar_rev_id, ar_title, ar_content_model from archive where ar_title='ET10';
+-----------+----------+------------------+
| ar_rev_id | ar_title | ar_content_model |
+-----------+----------+------------------+
|     23782 | ET10     | NULL             |
+-----------+----------+------------------+
  1. Create a Flow page ET10 with http://ca.wikipedia.beta.wmflabs.org/wiki/Especial:EnableFlow
select page_id,page_namespace, page_title, page_content_model from page where page_title like 'ET10' and page_namespace=1;
+---------+----------------+------------+--------------------+
| page_id | page_namespace | page_title | page_content_model |
+---------+----------------+------------+--------------------+
|   23631 |              1 | ET10       | flow-board         |
+---------+----------------+------------+--------------------+
  1. Go to deletion log: http://ca.wikipedia.beta.wmflabs.org/wiki/Especial:Registre/delete and Restore wikitext page Talk:ET10 -Error undeleting page

Undelete failed: No matching pages found in the deletion archive.

Error

An error has occurred.

Return to Portada.

[7d745e55] /w/index.php?title=Especial:Restaura&action=submit Flow\Exception\FlowException from line 76 of /srv/mediawiki/php-master/extensions/Flow/includes/BoardMover.php: Could not locate workflow for 23630

Backtrace:

#0 /srv/mediawiki/php-master/extensions/Flow/Hooks.php(1463): Flow\BoardMover->prepareMove(integer, Title)
#1 /srv/mediawiki/php-master/includes/Hooks.php(204): FlowHooks::onArticleUndelete(Title, boolean, string, integer)
#2 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(635): Hooks::run(string, array)
#3 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(384): PageArchive->undeleteRevisions(array, boolean, string)
#4 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(1652): PageArchive->undelete(array, string, array, boolean, User)
#5 /srv/mediawiki/php-master/includes/specials/SpecialUndelete.php(822): SpecialUndelete->undelete()
#6 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(384): SpecialUndelete->execute(NULL)
#7 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
#8 /srv/mediawiki/php-master/includes/MediaWiki.php(249): SpecialPageFactory::executePath(Title, RequestContext)
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(678): MediaWiki->performRequest()
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(475): MediaWiki->main()
#11 /srv/mediawiki/php-master/index.php(41): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): include(string)
#13 {main}

Event Timeline

Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova updated the task description. (Show Details)
Etonkovidova added a subscriber: Etonkovidova.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 2 2015, 5:12 PM

After initial Error display(as in the ticket), all subsequent attempts to Restore such pages from e.g. http://ca.wikipedia.beta.wmflabs.org/w/index.php?title=Especial:Restaura&target=Discussi%C3%B3%3AET10 do not do anything.

You may check http://ca.wikipedia.beta.wmflabs.org/wiki/Especial:Registre/delete for

  • Etonkovidova (Talk | contribs | block) deleted page Discussió:ET10
  • RoanKattouw (Talk | contribs | block) deleted page Discussió:Blah2
Catrope updated the task description. (Show Details)Aug 5 2015, 11:22 PM
Catrope set Security to None.
Catrope updated the task description. (Show Details)
Catrope added a subscriber: Legoktm.

We probably don't want to allow people to undelete wikitext pages on top of Flow boards, but the error message should make more sense.

Catrope triaged this task as Normal priority.Aug 5 2015, 11:25 PM

Re-checked while verifying T117812: Fix en:Wikipedia_talk:Flow/Developer_test_page

The issue is still happening - cannot restore wiki page after Flow page with the same name was created(via EnableFlow).
In this scenario, a page exists simultaneously in two tables:

Summary of the scenario:

  • create a wikitext page - Delete
  • Special: EnableFlow the page with the same title
  • Go to Special:Undelete - you'll see the page listed there
  • try Undelete - the above error is displayed.

There is also a follow up task: T122261: Come up with scenarios for deletion/undeletion of Flow boards and figure out how to handle them

Re-checked while verifying T117812: Fix en:Wikipedia_talk:Flow/Developer_test_page
The issue is still happening - cannot restore wiki page after Flow page with the same name was created(via EnableFlow).
In this scenario, a page exists simultaneously in two tables:
Summary of the scenario:

  • create a wikitext page - Delete
  • Special: EnableFlow the page with the same title
  • Go to Special:Undelete - you'll see the page listed there
  • try Undelete - the above error is displayed.

It should work if you move the Flow board out of the way (without leaving a redirect) before the Special:Undelete step. Not tested, though.

Specific cause is that it sees there's currently a Flow board there, so triggers onArticleDelete hook, so it expects the page ID being undeleted to be Flow, but it's not (the already-existent one was Flow, the undeleted page was not).

But I agree with Roan we should probably just block this scenario.

Change 277536 had a related patch set uploaded (by Matthias Mullie):
Block undeleting an article over an existing Flow board

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

Change 277536 merged by jenkins-bot:
Block undeleting an article over an existing Flow board

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

Checked the fix in betalabs - the error message is not present anymore. Instead, the proper warning is displayed: "The article couldn't be restored because there is currently a discussion board in place."

Below is the summary of issues that still present (for future improvements consideration)

  1. The proper warning to users is in place. But to find it - it's little confusing.

The below example uses Talk:Mavetuna2 page as an example.

  • create wikitext Talk:Mavetuna2 and then delete it.
  • via Special:EnableFlow create Talk:Mavetuna2
  • Special:Undelete informs that "The following page has been deleted but is still in the archive and can be restored."

  • Click on 'Restore revisions' button under 'Restore revisions' will give a proper warning:

No such action
The article couldn't be restored because there is currently a discussion board in place.

  1. clicking on the link Talk:Mavetuna2 from Special:Undelete page will present 'View and restore deleted pages' page with several points of confusion, including Talk:Mavetuna2 active link (to a new Flow board) and the following text "If a new page with the same name has been created since the deletion, the restored revisions will be merged with the new page's history, and the current revision of the live page will not be automatically replaced." - not true if a new page with the same name is a Flow board:

  1. Clicking on the link 'del/undel' link or on 'del/undel selected revision' button will display 'Delete/undelete revisions' page which has options only for changing the visibility of revisions.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 11:09 PM

@matthiasmullie @Mattflaschen @Catrope, before I close this, what about the confusing messaging Elena observes above. Does this need to be transferred to a new tag in "Interested"? (If so, if someone who understands the issue better than me could do it that would be helpful.)

Reposting this request for comment:

@matthiasmullie @Mattflaschen @Catrope, before I close this, what about the confusing messaging Elena observes above. Does this need to be transferred to a new ticket in "Interested"? (If so, if someone who understands the issue better than me could do it that would be helpful.)

Most of the things she mentioned are areas for possible improvement.

However, there is nothing wrong with "Talk:Mavetuna2 active link (to a new Flow board)" in my opinion. That is standard behavior for deleted pages where there is currently non-deleted content there (either due to a recreation or a partial deletion).

Filed the rest as T135166: More accurate UI text when you start doing a disallowed undeletion (over a Flow board)

Thanks Matt. Closing this now.

jmatazzoni closed this task as Resolved.May 12 2016, 8:47 PM

@matthiasmullie and I think that this should be allowed (but handled properly), so rEFLWd569f06d016e: WIP: Use ArticleRevisionUndeleted instead of ArticleUndelete takes that approach. This works without error (and you can later delete the Flow board and restore the wikitext and that will also still work).

The restriction put in place was also causing false positives.