Page MenuHomePhabricator

A18. Moving Talk:Search to Talk:Search/Old gives a fatal exception
Closed, ResolvedPublic

Description

I tried to move this page for Dan:

https://www.mediawiki.org/wiki/Talk:Search

He'd like to move it to Talk:Search/Old, so that they can start fresh for the new search project.

When I attempted to move it, I got this fatal:

[55363e20] 2015-04-30 17:20:36: Fatal exception of type "Flow\Exception\FlowException"

I tried moving a new test board -- Talk:Kazootest to Talk:Kazootest/Old, and it worked:

https://www.mediawiki.org/wiki/Talk:Kazootest/Old

It's possible that the difference is that Talk:Search has lots of content on it, and Talk:Kazootest is a newly-created board.


This is because it was deleted and restored without Flow having full support for that:

{
    "query": {
        "logevents": [
            {
                "logid": 2112856,
                "ns": 1,
                "title": "Talk:Search",
                "pageid": 254786,
                "logpage": 254786,
                "params": {},
                "type": "delete",
                "action": "restore",
                "user": "Savh",
                "timestamp": "2014-08-12T17:44:38Z",
                "comment": "3 revisions restored: Damn flow"
            },
            {
                "logid": 2112803,
                "ns": 1,
                "title": "Talk:Search",
                "pageid": 254786,
                "logpage": 227287,
                "params": {},
                "type": "delete",
                "action": "delete",
                "user": "Savh",
                "timestamp": "2014-08-12T17:28:36Z",
                "comment": "Spam"
            }
        ]
    }
}

2015-04-30 17:20:36 mw1245 mediawikiwiki exception INFO: [55363e20] /w/index.php?title=Special:MovePage&action=submit Flow\Exception\FlowException from line 97 of /srv/mediawiki/php-1.26wmf4/extensions/Flow/includes/BoardMover.php: Main discussion workflow for Talk:Search not found
#0 /srv/mediawiki/php-1.26wmf4/extensions/Flow/Hooks.php(1363): Flow\BoardMover->prepareMove()
#1 /srv/mediawiki/php-1.26wmf4/includes/Hooks.php(209): FlowHooks::onTitleMove()
#2 /srv/mediawiki/php-1.26wmf4/includes/MovePage.php(231): Hooks::run()
#3 /srv/mediawiki/php-1.26wmf4/includes/specials/SpecialMovepage.php(580): MovePage->move()
#4 /srv/mediawiki/php-1.26wmf4/includes/specials/SpecialMovepage.php(120): MovePageForm->doSubmit()
#5 /srv/mediawiki/php-1.26wmf4/extensions/Translate/tag/SpecialPageTranslationMovePage.php(136): MovePageForm->execute()
#6 /srv/mediawiki/php-1.26wmf4/includes/specialpage/SpecialPage.php(384): SpecialPageTranslationMovePage->execute()
#7 /srv/mediawiki/php-1.26wmf4/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run()
#8 /srv/mediawiki/php-1.26wmf4/includes/MediaWiki.php(267): SpecialPageFactory::executePath()
#9 /srv/mediawiki/php-1.26wmf4/includes/MediaWiki.php(565): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.26wmf4/includes/MediaWiki.php(414): MediaWiki->main()
#11 /srv/mediawiki/php-1.26wmf4/index.php(46): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): include()
#13 {main} {"private":false}


Article ID is 254786:

mattflaschen@terbium:~$ mwscript eval.php --wiki=mediawikiwiki
> var_export( Title::newFromText( 'Talk:Search' )->getArticleId() );
254786

There is no discussion workflow under that or 0 (0's should all be fixed now):

mysql:research@x1-analytics-slave [flowdb]> select LOWER(HEX(workflow_id)), workflow_wiki, workflow_namespace, workflow_page_id, workflow_title_text, workflow_type FROM flow_workflow WHERE workflow_wiki = 'mediawikiwiki' AND workflow_namespace = 1 AND workflow_title_text = 'Search' AND workflow_page_id IN (0, 254786 ) AND workflow_type = 'discussion' LIMIT 10;
Empty set (0.00 sec)

However, there are a bunch of topics, some under that ID, some the other one:

1mysql:research@x1-analytics-slave [flowdb]> select LOWER(HEX(workflow_id)), workflow_wiki, workflow_namespace, workflow_page_id, workflow_title_text, workflow_type FROM flow_workflow WHERE workflow_wiki = 'mediawikiwiki' AND workflow_namespace = 1 AND workflow_title_text = 'Search' ORDER by workflow_id DESC LIMIT 500;
2+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
3| LOWER(HEX(workflow_id)) | workflow_wiki | workflow_namespace | workflow_page_id | workflow_title_text | workflow_type |
4+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
5| 052fd08804fe3988385748 | mediawikiwiki | 1 | 254786 | Search | topic |
6| 052f73bcdfc19f1874e2e1 | mediawikiwiki | 1 | 254786 | Search | topic |
7| 052cf05e49e5daacbf6201 | mediawikiwiki | 1 | 254786 | Search | topic |
8| 05281e60255391659d076a | mediawikiwiki | 1 | 254786 | Search | topic |
9| 05271c3a5d140e0b834e42 | mediawikiwiki | 1 | 254786 | Search | topic |
10| 0526fc160be6093679fa9f | mediawikiwiki | 1 | 254786 | Search | topic |
11| 05269149f772c7cdd7bdc4 | mediawikiwiki | 1 | 254786 | Search | topic |
12| 0526914999c8875a17505f | mediawikiwiki | 1 | 254786 | Search | topic |
13| 05268a1131617d95ba15d4 | mediawikiwiki | 1 | 254786 | Search | topic |
14| 0525fb1eb5e269bff438d6 | mediawikiwiki | 1 | 254786 | Search | topic |
15| 05255fb9d539ae4cbd04de | mediawikiwiki | 1 | 254786 | Search | topic |
16| 05255d0025b73e19917a1a | mediawikiwiki | 1 | 254786 | Search | topic |
17| 052545c1e859ae4cbd04de | mediawikiwiki | 1 | 254786 | Search | topic |
18| 0524cdf24c6ea7bdf02cc5 | mediawikiwiki | 1 | 254786 | Search | topic |
19| 0524aa237073caebf65d66 | mediawikiwiki | 1 | 254786 | Search | topic |
20| 0524595c53a130d756f04e | mediawikiwiki | 1 | 254786 | Search | topic |
21| 0523fa594e4a4ce5b4a65d | mediawikiwiki | 1 | 254786 | Search | topic |
22| 05230fd539a2093679fa9f | mediawikiwiki | 1 | 254786 | Search | topic |
23| 0522e34dc39fb4490a3a4d | mediawikiwiki | 1 | 254786 | Search | topic |
24| 0522b0a9892336c77b07a4 | mediawikiwiki | 1 | 254786 | Search | topic |
25| 05228b104be940f74d573c | mediawikiwiki | 1 | 254786 | Search | topic |
26| 0522609b6cf4f4fec0b830 | mediawikiwiki | 1 | 254786 | Search | topic |
27| 052249ebcc189f1f5505a7 | mediawikiwiki | 1 | 254786 | Search | topic |
28| 05223d2bc2f1ae4cbd04de | mediawikiwiki | 1 | 254786 | Search | topic |
29| 05223d298bab0091b3b90e | mediawikiwiki | 1 | 254786 | Search | topic |
30| 05223d236b1669bff438d6 | mediawikiwiki | 1 | 254786 | Search | topic |
31| 05223d1effd93fb432110c | mediawikiwiki | 1 | 254786 | Search | topic |
32| 05223d12348e69bff438d6 | mediawikiwiki | 1 | 254786 | Search | topic |
33| 0522278f7f093fb432110c | mediawikiwiki | 1 | 254786 | Search | topic |
34| 0522278973f585a9127c61 | mediawikiwiki | 1 | 254786 | Search | topic |
35| 05221a215b76613fb95771 | mediawikiwiki | 1 | 254786 | Search | topic |
36| 05220752a8a5b4ce39d167 | mediawikiwiki | 1 | 254786 | Search | topic |
37| 0521e21e3dffce88385748 | mediawikiwiki | 1 | 254786 | Search | topic |
38| 05219171671a5ab8c89157 | mediawikiwiki | 1 | 254786 | Search | topic |
39| 05219160a8fd85a9127c61 | mediawikiwiki | 1 | 254786 | Search | topic |
40| 0521915a19170091b3b90e | mediawikiwiki | 1 | 254786 | Search | topic |
41| 052185903f07ab417cd5b8 | mediawikiwiki | 1 | 254786 | Search | topic |
42| 05218577187d40f74d573c | mediawikiwiki | 1 | 254786 | Search | topic |
43| 0521775fb3c0711b784a51 | mediawikiwiki | 1 | 254786 | Search | topic |
44| 0521674acb003f9f9a9c62 | mediawikiwiki | 1 | 254786 | Search | topic |
45| 0521570f445cf8acbf6201 | mediawikiwiki | 1 | 254786 | Search | topic |
46| 05210e0fab9f0091b3b90e | mediawikiwiki | 1 | 254786 | Search | topic |
47| 05207fe74584eab87f936d | mediawikiwiki | 1 | 254786 | Search | topic |
48| 05206b8779b9b4ce39d167 | mediawikiwiki | 1 | 254786 | Search | topic |
49| 0520473b2e19da93dbfe64 | mediawikiwiki | 1 | 254786 | Search | topic |
50| 051fd889ea3b3b2940c8e3 | mediawikiwiki | 1 | 254786 | Search | topic |
51| 051fc8dbafcfc9e9e075e2 | mediawikiwiki | 1 | 254786 | Search | topic |
52| 051fc5c811ee093679fa9f | mediawikiwiki | 1 | 254786 | Search | topic |
53| 051f9e7f96e9231874e2e1 | mediawikiwiki | 1 | 254786 | Search | topic |
54| 051f8eb3cf7c5996a9540c | mediawikiwiki | 1 | 254786 | Search | topic |
55| 051f7d4b8f78526f3bc6e4 | mediawikiwiki | 1 | 254786 | Search | topic |
56| 051f6617ef1cf4fec0b830 | mediawikiwiki | 1 | 254786 | Search | topic |
57| 051f591ea353caebf65d66 | mediawikiwiki | 1 | 254786 | Search | topic |
58| 051f2f950825ae4cbd04de | mediawikiwiki | 1 | 254786 | Search | topic |
59| 051f2f8d75b97edc9a371f | mediawikiwiki | 1 | 254786 | Search | topic |
60| 051f2cf3e07b01239ef20b | mediawikiwiki | 1 | 227287 | Search | topic |
61| 051f2cf1cb4f1da9060a0e | mediawikiwiki | 1 | 227287 | Search | topic |
62| 051f2cee5e070091b3b90e | mediawikiwiki | 1 | 227287 | Search | topic |
63| 051f2ceb7a9185a9127c61 | mediawikiwiki | 1 | 227287 | Search | topic |
64| 051f2ce90be4711b784a51 | mediawikiwiki | 1 | 227287 | Search | topic |
65| 051f2ce7157411ab6070bd | mediawikiwiki | 1 | 227287 | Search | topic |
66| 051f2ce43b8701239ef20b | mediawikiwiki | 1 | 227287 | Search | topic |
67| 051f2cdedef301239ef20b | mediawikiwiki | 1 | 227287 | Search | topic |
68| 051f25d72093ce88385748 | mediawikiwiki | 1 | 227287 | Search | topic |
69| 051f228a62a97edc9a371f | mediawikiwiki | 1 | 227287 | Search | topic |
70| 051efc1cee7ceab87f936d | mediawikiwiki | 1 | 227287 | Search | topic |
71| 051ed8e2b83966c59c1012 | mediawikiwiki | 1 | 227287 | Search | topic |
72| 051eb4fa03cdae4cbd04de | mediawikiwiki | 1 | 227287 | Search | topic |
73| 051e9b346d2e093679fa9f | mediawikiwiki | 1 | 227287 | Search | topic |
74| 051e9a8ea757ab417cd5b8 | mediawikiwiki | 1 | 227287 | Search | topic |
75| 051e819c9fcb5b6246f859 | mediawikiwiki | 1 | 227287 | Search | topic |
76| 051e7e1deb93a981ce555e | mediawikiwiki | 1 | 227287 | Search | topic |
77| 051e6075b5ad52bb4f309f | mediawikiwiki | 1 | 227287 | Search | topic |
78| 051e1ffef3a17d95ba15d4 | mediawikiwiki | 1 | 227287 | Search | topic |
79| 051e1ff4452bcaebf65d66 | mediawikiwiki | 1 | 227287 | Search | topic |
80| 051e15966183ce88385748 | mediawikiwiki | 1 | 227287 | Search | topic |
81| 051e0b5221494b35da5afc | mediawikiwiki | 1 | 227287 | Search | topic |
82| 051dc61a621152bb4f309f | mediawikiwiki | 1 | 227287 | Search | topic |
83| 051dbafe50e3ce88385748 | mediawikiwiki | 1 | 227287 | Search | topic |
84| 051da298252fa981ce555e | mediawikiwiki | 1 | 227287 | Search | topic |
85| 051d83e54c6f1f5f5077f9 | mediawikiwiki | 1 | 227287 | Search | topic |
86| 051d83e2c3e8eab87f936d | mediawikiwiki | 1 | 227287 | Search | topic |
87| 051d6f42ce88f8acbf6201 | mediawikiwiki | 1 | 227287 | Search | topic |
88| 051ce96201261c2e7b5e7f | mediawikiwiki | 1 | 227287 | Search | topic |
89| 051c953a8dce613fb95771 | mediawikiwiki | 1 | 227287 | Search | topic |
90| 051c90e8f7b3c9e9e075e2 | mediawikiwiki | 1 | 227287 | Search | topic |
91| 051c90e86bddb4ce39d167 | mediawikiwiki | 1 | 227287 | Search | topic |
92| 051c90e81075c1230b7168 | mediawikiwiki | 1 | 227287 | Search | topic |
93| 051c5dc4e46794333aefc7 | mediawikiwiki | 1 | 227287 | Search | topic |
94| 051c10dd2c4b3e19917a1a | mediawikiwiki | 1 | 227287 | Search | topic |
95| 051c05215da7caebf65d66 | mediawikiwiki | 1 | 227287 | Search | topic |
96| 051c000d43f301239ef20b | mediawikiwiki | 1 | 227287 | Search | topic |
97| 051bc03a1f63b4490a3a4d | mediawikiwiki | 1 | 227287 | Search | topic |
98| 051bb95cfd64ff31f434c3 | mediawikiwiki | 1 | 227287 | Search | topic |
99| 051b961faaf80f0ee2f5c4 | mediawikiwiki | 1 | 227287 | Search | topic |
100| 051b8477fdf0b5b5126100 | mediawikiwiki | 1 | 227287 | Search | topic |
101| 051b3687d678b5b5126100 | mediawikiwiki | 1 | 227287 | Search | topic |
102| 051b36860207bc94a85e58 | mediawikiwiki | 1 | 227287 | Search | topic |
103| 051b3684e1380f0ee2f5c4 | mediawikiwiki | 1 | 227287 | Search | topic |
104| 051b3682e0df94333aefc7 | mediawikiwiki | 1 | 227287 | Search | topic |
105| 051b367d68297edc9a371f | mediawikiwiki | 1 | 227287 | Search | topic |
106| 051b3676fc971f5f5077f9 | mediawikiwiki | 1 | 227287 | Search | topic |
107| 051b362e177e669f9a9c62 | mediawikiwiki | 1 | 227287 | Search | topic |
108| 051b362847d0af9dd77845 | mediawikiwiki | 1 | 227287 | Search | topic |
109| 051b36215694b5b5126100 | mediawikiwiki | 1 | 227287 | Search | topic |
110| 051b361bfc253fb432110c | mediawikiwiki | 1 | 227287 | Search | topic |
111| 051b3616d13e613fb95771 | mediawikiwiki | 1 | 227287 | Search | topic |
112| 051b36094e418936944a08 | mediawikiwiki | 1 | 227287 | Search | topic |
113| 051b3607eca6669f9a9c62 | mediawikiwiki | 1 | 227287 | Search | topic |
114| 051b1d2f4a76613fb95771 | mediawikiwiki | 1 | 227287 | Search | topic |
115| 051b1d2dc9c8f8acbf6201 | mediawikiwiki | 1 | 227287 | Search | topic |
116| 051b1d2b2102669f9a9c62 | mediawikiwiki | 1 | 227287 | Search | topic |
117| 051b1d27dd639b30a58a24 | mediawikiwiki | 1 | 227287 | Search | topic |
118| 051b1abb1dd3b4490a3a4d | mediawikiwiki | 1 | 227287 | Search | topic |
119| 051b01704325de44a41881 | mediawikiwiki | 1 | 227287 | Search | topic |
120| 051afb02d4580f0ee2f5c4 | mediawikiwiki | 1 | 227287 | Search | topic |
121| 051ae1cbb73c1666efe1fb | mediawikiwiki | 1 | 227287 | Search | topic |
122| 051ad11d3853b4490a3a4d | mediawikiwiki | 1 | 227287 | Search | topic |
123| 051aa7d56d3d52bb4f309f | mediawikiwiki | 1 | 227287 | Search | topic |
124| 051aa7d1c4cc11ab6070bd | mediawikiwiki | 1 | 227287 | Search | topic |
125| 051a16a210e3ce88385748 | mediawikiwiki | 1 | 227287 | Search | topic |
126| 0519a1960163d0380359fc | mediawikiwiki | 1 | 227287 | Search | topic |
127| 05199816386552bb4f309f | mediawikiwiki | 1 | 227287 | Search | topic |
128| 051973ed9f517edc9a371f | mediawikiwiki | 1 | 227287 | Search | topic |
129| 0519291358709f1f5505a7 | mediawikiwiki | 1 | 227287 | Search | topic |
130| 0519291358489f1f5505a7 | mediawikiwiki | 1 | 227287 | Search | discussion |
131+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
132126 rows in set (0.00 sec)

I got the workflow_id from https://www.mediawiki.org/w/api.php?action=query&prop=revisions&titles=talk:Search&rvlimit=10&rvprop=ids|content and formatted it with https://www.mediawiki.org/wiki/Talk:Collaboration/Team/Processes#mysql (could have also queried without the page ID):

mysql:research@x1-analytics-slave [flowdb]> select LOWER(HEX(workflow_id)), workflow_wiki, workflow_namespace, workflow_page_id, workflow_title_text, workflow_type FROM flow_workflow WHERE LOWER(HEX(workflow_id)) = '0519291358489f1f5505a7';+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
| LOWER(HEX(workflow_id)) | workflow_wiki | workflow_namespace | workflow_page_id | workflow_title_text | workflow_type |
+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
| 0519291358489f1f5505a7  | mediawikiwiki |                  1 |           227287 | Search              | discussion    |
+-------------------------+---------------+--------------------+------------------+---------------------+---------------+
1 row in set (0.06 sec)

The page ID is mysteriously different and that one doesn't exist in the page or archive table:

> var_export( Title::newFromID( 254786 )->getPrefixedText() );
'Talk:Search'
> var_export( Title::newFromID( 227287 ) );
NULL
mysql:research@s3-analytics-slave [mediawikiwiki]> SELECT ar_id, ar_namespace, ar_title, ar_text, ar_page_id, ar_content_model, ar_content_format FROM archive WHERE ar_page_id = 227287 OR ( ar_namespace = 1 AND ar_title = 'Search' );
Empty set (0.07 sec)

Event Timeline

DannyH created this task.Apr 30 2015, 5:21 PM
DannyH updated the task description. (Show Details)
DannyH raised the priority of this task from to Needs Triage.
DannyH moved this task to Team discussion on the Collaboration-Team-Triage board.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 30 2015, 5:21 PM
DannyH triaged this task as Unbreak Now! priority.Apr 30 2015, 5:49 PM

Unbreak Now because it's getting in the way of Dan and the Search/Discovery team.

Weird, it's going through SpecialPageTranslationMovePage for some reason. Not sure if that's related, though.

I looked into it, and there's some weird page ID there instead of the right one. The script I ran today didn't change/fix that because it only affected workflows with 0 page ID.

This is because it was deleted and restored without Flow having support for this (relevant patch, under code review, is https://gerrit.wikimedia.org/r/#/c/205613/).

After the deletion patches are all merged, we should probably update FlowUpdateWorkflowPageId to do an unconditional update (rather than only for 0). That would fix this. The only problem would be if somehow the page ID is correct but the title is wrong.

Change 208636 had a related patch set uploaded (by Matthias Mullie):
Fix more than just workflow_page_id === 0

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

As @Mattflaschen already said: the current page id the workflow is associated with, is incorrect (page id changes when it's deleted & restored) - https://gerrit.wikimedia.org/r/#/c/205613/ will fix that.

Updated FlowUpdateWorkflowPageId.php to also reassociate incorrect workflow_page_ids like these: https://gerrit.wikimedia.org/r/#/c/208636/

DannyH renamed this task from Moving Talk:Search to Talk:Search/Old gives a fatal exception to A18. Moving Talk:Search to Talk:Search/Old gives a fatal exception.May 6 2015, 8:43 PM

Change 208636 merged by jenkins-bot:
Fix more than just workflow_page_id === 0

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

Change 209646 had a related patch set uploaded (by Mattflaschen):
Fix more than just workflow_page_id === 0

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

Change 209647 had a related patch set uploaded (by Mattflaschen):
Fix more than just workflow_page_id === 0

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

Change 209646 merged by jenkins-bot:
Fix more than just workflow_page_id === 0

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

Change 209647 merged by jenkins-bot:
Fix more than just workflow_page_id === 0

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

DannyH closed this task as Resolved.May 13 2015, 5:06 PM

I moved the page, all is well.