Last modified: 2014-08-09 06:46:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67620, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65620 - Complex categories make GWToolset fail on step 3 (batch preview)
Complex categories make GWToolset fail on step 3 (batch preview)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GWToolset (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: dan
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-22 05:37 UTC by
Modified: 2014-08-09 06:46 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Error message screen (16.64 KB, image/png)
2014-05-22 05:37 UTC,
Details

Description 2014-05-22 05:37:44 UTC
Created attachment 15454 [details]
Error message screen

Both on product and beta cluster, for the past 4 days GWT consistently fails with the message:
PHP fatal error in /srv/common-local/php-master/includes/OutputPage.php line 1294:
Call to a member function getText() on a non-object

See attachment for a screen capture.

The outage is only apparent when attempting to run the tool to upload a file, the forms in advance of that point work correctly showing the GWT user rights are valid. Test xml files have been tried with 4 and 1 image. The same file was uploaded through the GWT by Dan, with an immediately successful result, indicating that this is an issue tied to my account (User:Fæ). See http://commons.wikimedia.beta.wmflabs.org/wiki/File:Three_weeks_after_marriage-LCCN2003689153.tif for the uploaded file.
Comment 1 Gilles Dubuc 2014-05-22 07:03:07 UTC
Could you please provide the xml, etc. for us to try it directly?

The error you're pointing to seems related to categories.
Comment 3 Gilles Dubuc 2014-05-22 13:10:10 UTC
Thanks. That xml worked fine on my local install.

> the forms in advance of that point work correctly showing the GWT user rights are valid.

Are you getting the error on "Step 3: Batch preview", where the batch is normally previewed? Or on "Step 4: Batch upload" where the confirmation of the job creation is displayed?

Did you add any categories in the form on "Step 2: Metadata mapping"?
Comment 4 2014-05-22 13:20:07 UTC
Ah ha - The error was generated on Batch preview and I did add categories.

I can get a successful preview by not choosing categories or only using the simple cat_1 = "British Cartoon Prints Collection" but the complex substitution one causes a fail "Images uploaded by {{subst:User:Fae/Fae}}"

The error appears to be down to use of a template this way within a category name.

As a known error, this is easy for me to now work around, but is probably a bug in the way categories get parsed compared to other fields.
Comment 5 Tisza Gergő 2014-05-22 16:45:44 UTC
At a minumum, this should be a normal error, not a fatal one.
Comment 6 Gilles Dubuc 2014-05-23 06:30:23 UTC
This is possibly related to recent changes Dan has made to the Batch preview page: https://gerrit.wikimedia.org/r/#/c/127839/
Comment 7 Mark Holmquist 2014-06-09 16:31:06 UTC
Hey Dan - can you take a look at this, and at least comment on Gilles's hypothesis in comment 6?

(unassigning because it looks like Gergo isn't working on this)
Comment 8 dan 2014-06-09 21:25:59 UTC
hey mark - i’ll take a look at this on wednesday or sooner if i can.
Comment 9 dan 2014-06-11 18:59:49 UTC
* narrowed down the issue to line 200 of includes/Forms/PreviewForm.php, $Output->setCategoryLinks( $item['categories'] ); it has a problem with the complex category; investigating further ...
Comment 10 dan 2014-06-11 23:44:26 UTC
1. are categories such as [[Category:Images uploaded by {{subst:User:Fae/Fae}}]] 
   allowed?
Comment 11 dan 2014-06-12 00:21:09 UTC
the issue for the preview page is definitely that complex category and the way i set-up the placement of the categories onto the preview page using $Output->setCategoryLinks( $item['categories'] ); that method doesn't seem to be able to handle the complex category. i tried to pre-parse the category ahead of time, but have not yet succeeded. at the moment i have 2 possible solutions:

1. remove the display of the categories on the preview page.
2. remove the complex category from the preview page, but allow non-complex categories on the preview page. the complex category would show on the final page.

unless someone else has time to sort out a better solution, which one shall we go with?
Comment 12 dan 2014-06-13 16:15:24 UTC
attempted to apply some logic that will pre-parse the category and if it fails will not display it in the preview, which would have resulted in an error.

https://gerrit.wikimedia.org/r/#/c/139410/
Comment 13 Gerrit Notification Bot 2014-06-19 08:29:35 UTC
Change 139410 had a related patch set uploaded by Siebrand:
Complex categories

https://gerrit.wikimedia.org/r/139410
Comment 14 dan 2014-06-26 07:34:07 UTC
the patch has been deployed to production. are you okay with closing the ticket now?
Comment 15 dan 2014-08-09 06:46:43 UTC
spoke with Fæ at wikimania london. he said he’s fine with closing it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links