Page MenuHomePhabricator

U5. ConvertLqtPage only importing first topic and putting flow-workflow JSON in header
Closed, ResolvedPublic3 Estimated Story Points

Description

With the settings I plan to use in production, I'm having an issue with the conversion:

Before:

LQT_Local_Test_Before_Conversion.png (578×1 px, 36 KB)

Command:

1vagrant@mediawiki-vagrant:~$ mwscript extensions/Flow/maintenance/convertLqtPage.php --wiki=wiki --redirect --convertnotifications --verbose Wiki_talk:LQT_redirect_test_2015-04-07_retest
2PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0
3[2015-04-08 01:59:16] Starting LQT import from Wiki_talk:LQT_redirect_test_2015-04-07_retest to Wiki_talk:LQT_redirect_test_2015-04-07_retest
4[2015-04-08 01:59:16] Importing to Wiki talk:LQT redirect test 2015-04-07 retest
5[2015-04-08 01:59:17] Importing header
6[2015-04-08 01:59:19] Imported 2 revisions for header
7[2015-04-08 01:59:19] Importing new topic
8[2015-04-08 01:59:19] Finished importing topic title with 1 revisions
9[2015-04-08 01:59:19] Importing post
10[2015-04-08 01:59:20] Finished importing post with 1 revisions
11[2015-04-08 01:59:23] Importing new topic
12[2015-04-08 01:59:24] Finished importing topic title with 1 revisions
13[2015-04-08 01:59:24] Importing post
14[2015-04-08 01:59:24] Finished importing post with 1 revisions
15[2015-04-08 01:59:24] Importing post
16[2015-04-08 01:59:25] Finished importing post with 1 revisions
17[2015-04-08 01:59:25] Importing post
18[2015-04-08 01:59:26] Finished importing post with 1 revisions
19[2015-04-08 01:59:32] Importing new topic
20[2015-04-08 01:59:32] Finished importing topic title with 1 revisions
21[2015-04-08 01:59:32] Importing post
22[2015-04-08 01:59:33] Finished importing post with 1 revisions
23[2015-04-08 01:59:33] Importing post
24[2015-04-08 01:59:34] Finished importing post with 1 revisions
25[2015-04-08 01:59:39] Imported 4 items, failed 0
26Warning: Must specify directory location for XHProf runs. Trying /tmp as default. You can either pass the directory location as an argument to the constructor for XHProfRuns_Default() or set xhprof.output_dir ini param.

The output looks fine except for the XHProf output, which I don't think is the cause of the issue.

After:

LQT_Local_Test_After_Conversion.png (585×1 px, 58 KB)

Event Timeline

This happens without the redirect parameter too:

1vagrant@mediawiki-vagrant:~$ mwscript extensions/Flow/maintenance/convertLqtPage.php --wiki=wiki --convertnotifications --verbose Wiki_talk:LQT_test_without_redirect_2015-04-07
2PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0
3[2015-04-08 02:18:11] Starting LQT import from Wiki_talk:LQT_test_without_redirect_2015-04-07 to Wiki_talk:LQT_test_without_redirect_2015-04-07
4[2015-04-08 02:18:11] Importing to Wiki talk:LQT test without redirect 2015-04-07
5[2015-04-08 02:18:12] Importing header
6[2015-04-08 02:18:14] Imported 2 revisions for header
7[2015-04-08 02:18:14] Importing new topic
8[2015-04-08 02:18:14] Finished importing topic title with 1 revisions
9[2015-04-08 02:18:14] Importing post
10[2015-04-08 02:18:15] Finished importing post with 1 revisions
11[2015-04-08 02:18:15] Importing post
12[2015-04-08 02:18:15] Finished importing post with 1 revisions
13[2015-04-08 02:18:18] Importing new topic
14[2015-04-08 02:18:18] Finished importing topic title with 1 revisions
15[2015-04-08 02:18:18] Importing post
16[2015-04-08 02:18:19] Finished importing post with 1 revisions
17[2015-04-08 02:18:21] Imported 3 items, failed 0
18Warning: Must specify directory location for XHProf runs. Trying /tmp as default. You can either pass the directory location as an argument to the constructor for XHProfRuns_Default() or set xhprof.output_dir ini param.

LQT_Local_Test_After_Conversion_Without_Redirect.png (583×1 px, 51 KB)

You can see there were two topics again.

DannyH edited a custom field.
DannyH renamed this task from convertLqtPage only importing first topic and putting flow-workflow JSON in header to U5. ConvertLqtPage only importing first topic and putting flow-workflow JSON in header.Apr 8 2015, 10:25 PM

Change 202979 had a related patch set uploaded (by Mattflaschen):
WIP: LQT maintenance refactoring

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

This is basically due to a misunderstanding of how the script works, partly due to it really being two scripts in one.

We never intended to do a production conversion where source and target page were the same (there is always an archiving step, or previously when testing a local conversion, different source and target page names), but the script allowed that (but failed).

https://gerrit.wikimedia.org/r/#/c/202979/ makes this much more fool-proof.

Change 202979 merged by jenkins-bot:
LQT maintenance refactoring

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

Change 205369 had a related patch set uploaded (by EBernhardson):
LQT maintenance refactoring

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

Change 205369 merged by jenkins-bot:
LQT maintenance refactoring

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