Page MenuHomePhabricator

Displays <a href="#">another file</a> instead of a link to "the existing file".
Closed, ResolvedPublic

Description

Step 1. Go to https://commons.wikimedia.org/wiki/Special:UploadWizard
Step 2. Press "Share images from Flickr".
Step 3. Enter https://www.flickr.com/photos/statephotos/14950833937/ and press "Get from Flickr".

Expected result: there should be a hyperlink for the words "another file".

Actual result:It says: There is <a href="#">another file</a> already on the site with the same content.

I'm using
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0a1
AMD Radeon HD 7310 Graphics
Windows 8 64-bit, x64.


Version: 1.25-git
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46741
https://bugzilla.wikimedia.org/show_bug.cgi?id=69993

Details

Reference
bz70617

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:46 AM
bzimport set Reference to bz70617.
Josve05a created this task.Sep 9 2014, 5:37 PM
  • Bug 59203 has been marked as a duplicate of this bug. ***

Core bug caused by the fix for bug 69993.

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

The patch that caused this (e16ca154f47b0d95060c9f7663c74fa11f848c09) was trying to solve the issue that {{PLURAL:N|1=a|2=b}} is not parsed as [['1', 'a'], ['2', 'b']], but rather ['1=a', '2=b'], which becomes a problem when '1=a' gets parsed and we can't un-parse it to pull out the number, and therefore parse the explicit plural forms.

It solved that by "flattening" nodes that are jQuery objects to HTML, which broke things for the normal case.

The best way to do this would be to extend the parser to support explicit parameters (good luck doing that, heh). A less bad way (than the current) would be to move the DOM object stringification to mw.language.convertPlural() and only do it when necessary (should be easy-ish).

Gilles, do you want to look into this?

gerritadmin wrote:

Change 163460 had a related patch set uploaded by Santhosh:
mediawiki.jqueryMsg: Support arbitrary expressions in plural forms

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

Thanks Santhosh!

gerritadmin wrote:

Change 163460 merged by jenkins-bot:
mediawiki.jqueryMsg: Support arbitrary expressions in plural forms

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

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