Page MenuHomePhabricator

UploadWizard should not crash if message contains unknown magic word or template
Closed, ResolvedPublic

Description

UploadWizard will not advance past step 1 in the Swedish localization.

Steps to reproduce:

  1. Visit http://commons.wikimedia.org/wiki/Special:UploadWizard?uselang=sv
  1. Select a file to upload and press upload
  1. Press 'Continue' ('Fortsätt').

Expected behavior:

UW will advance to the next step.

Actual behavior.

Nothing happens. Click triggers error in line 504 of mediawiki.language.parser.js:

ret = _this[ operation ]( subnodes, replacements );

_this[operation] is not a function. Swedish does not use {{GRAMMAR}} so I am assuming this is separate from bug 29582.


Version: unspecified
Severity: critical

Details

Reference
bz30707
TitleReferenceAuthorSource BranchDest Branch
Migrate refine webrequest job to Airflowrepos/data-engineering/airflow-dags!260aquT327073_migrate_refine_webrequest_to_airflowmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 11:53 PM
bzimport added projects: UploadWizard, I18n.
bzimport set Reference to bz30707.
bzimport added a subscriber: Unknown Object (MLST).

Confirmed in Firefox 6.0.1 on OSX 10.7. I get "Script error." at the top of the page. Clicking "Fortsätt" a second time add a second line with "Script error.".

Unfortunately Firebug is not yet available for Firefox 6.0.1, so I had to continue testing in Firefox 5.0.x with Firebug 1.8.1.

Steps to reproduce need to be corrected:

  1. Go to http://commons.wikimedia.org/wiki/Special:UploadWizard?uselang=sv while logged in on Wikimedia Commons
  2. Click "Nasta" at the bottom of the page.
  3. Click "Valj en mediafil att donera".
  4. Select an image to upload
  5. After clicking OK in the selection window, you should see a preview of the image that is to be uploaded.
  6. Click "Ladda up"; the image gets uploaded.
  7. Click "Fortsätt"

Expected behavior:

  • UploadWizard will advance to the next step.

Observer behavior.

  • "Script error." at the top of the page. Clicking "Fortsätt" a second time add a second line with "Script error."
  • Firebug reports in console: _this[operation] is not a function

https://bits.wikimedia.org/commons.wikimedia.org/load.php?debug=false&lang=sv&modules=ext!gadget!HotCat%7Cext!uploadwizard!mediawiki!language!parser%7Cjquery!autoEllipsis%7Cjquery!checkboxShiftClick%7Cjquery!client%7Cjquery!collapsibleTabs%7Cjquery!cookie%7Cjquery!delayedBind%7Cjquery!highlightText%7Cjquery!placeholder%7Cjquery!suggestions%7Cjquery!tabIndex%7Cjquery!ui!button%7Cjquery!ui!core%7Cjquery!ui!datepicker%7Cjquery!ui!dialog%7Cjquery!ui!draggable%7Cjquery!ui!mouse%7Cjquery!ui!position%7Cjquery!ui!progressbar%7Cjquery!ui!resizable%7Cjquery!ui!widget%7Cmediawiki!Uri%7Cmediawiki!language%7Cmediawiki!legacy!ajax%7Cmediawiki!legacy!ajaxwatch%7Cmediawiki!legacy!htmlform%7Cmediawiki!legacy!mwsuggest%7Cmediawiki!legacy!wikibits%7Cmediawiki!util&skin=vector&version=20110902T191657Z
Line 70. Click triggers error in line 504 of
mediawiki.language.parser.js:

Google Chrome gives a more useful error:

Uncaught TypeError: Property 'sietname' of object #<Object> is not a function

Yep, misspelling in the i18n file. Michael fixed it in SVN and I manually updated the MediaWiki: message on Commons. Should be fixed now.

Fixed in r96147 by Michael Dale and immediately by me in
http://commons.wikimedia.org/w/index.php?title=MediaWiki:Mwe-upwiz-license-none-applicable-subhead/sv&oldid=58811624

There was a typo in {{SITENAME}} ({{SIETNAME}}). The parser is *very*
unforgiving and IMO it shouldn't be...

Reopening.

UploadWizard should not be crashing if a message contains a parser word that it doesn't understand. ie. {{SIETNAME}}, although wrong, could also be [[Template:SIETNAME]], although not supported in UW, it's valid wikitext and it shouldn't be crashing on that. A mw.log about it is sufficient (if anything).

Unfortunately Firebug is not yet available for Firefox 6.0.1

I have 6.0.1 with working FireBug, Linux version though.

neilk wrote:

*** Bug 30874 has been marked as a duplicate of this bug. ***

neilk wrote:

*** Bug 30665 has been marked as a duplicate of this bug. ***

neilk wrote:

Should be fixed in r96941