Page MenuHomePhabricator

Add support for unencoded Unicode URLs
Closed, ResolvedPublic3 Story Points

Description

URLs in encoded form can be used for import:
https://ar.wikipedia.org/wiki/%D9%85%D9%84%D9%81:1967%2BTUN.jpg
https://ar.wikipedia.org/wiki/%D9%85%D9%84%D9%81:UD_%D9%84%D9%88%D8%BA%D8%B1%D9%8A%D9%86%D9%8A%D9%8A%D8%B3.png

Unencoded URLs can't:
https://ar.wikipedia.org/wiki/ملف:1967+TUN.jpg
https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png

Failed to discover API location from: "https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png". Status code 200,

Technically this is a missing feature, but from the users perspective (these users are used to unencoded URLs working) it's a bug.

Acceptance criteria:

Details

Related Gerrit Patches:
mediawiki/extensions/FileImporter : masterNormalize spaces in Wikimedia source URLs
mediawiki/extensions/FileImporter : masterAllow plus characters in source URLs
mediawiki/extensions/FileImporter : masterProvide non-empty plain text message in HttpRequestException
mediawiki/extensions/FileImporter : masterFix incomplete error reporting in HttpApiLookup

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptJun 1 2018, 1:57 PM
thiemowmde triaged this task as Medium priority.Jun 1 2018, 1:57 PM
thiemowmde moved this task from Incoming to Move files to Commons on the TCB-Team board.

Sounds a bit like what I got with curl and where I added this patch

https://gerrit.wikimedia.org/r/#/c/436224/

If you look at the code around there you also will know why that comma. We should look at it when we schedule the ticket.

@Bmueller, can you add what you know about the original bug report as provided by the user? I'm looking for the filename. Does it contain spaces or underscores? If it does, then this is not about Unicode support, but about spaces.

Change 437435 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Normalize spaces in Wikimedia source URLs

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

Tobi_WMDE_SW set the point value for this task to 3.Jun 5 2018, 12:38 PM
Tobi_WMDE_SW added a subscriber: Tobi_WMDE_SW.

Include fixing of error handling.

Change 437478 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Fix incomplete error reporting in HttpApiLookup

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

Change 437506 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Provide non-empty plain text message in HttpRequestException

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

Change 437478 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Fix incomplete error reporting in HttpApiLookup

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

thiemowmde moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2018-06-05 board.
Bmueller added a comment.EditedJun 6 2018, 9:32 AM

@thiemowmde, this is the originial bug report: "When I click EditFileInfo or Info button, I get an error 200."

Screenshot:

Change 437729 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Allow plus characters in source URLs

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

Change 437506 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Provide non-empty plain text message in HttpRequestException

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

Change 437729 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Allow plus characters in source URLs

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

thiemowmde updated the task description. (Show Details)Jun 6 2018, 4:29 PM

Change 437435 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Normalize spaces in Wikimedia source URLs

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

WMDE-Fisch updated the task description. (Show Details)Jun 7 2018, 1:32 PM
WMDE-Fisch moved this task from Review to Demo on the WMDE-QWERTY-Sprint-2018-06-05 board.

Can be tested with

https://test.wikimedia.beta.wmflabs.org/wiki/Special:ImportFile?clientUrl=https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png

( or any other file url you put behind the clientUrl= )

Vvjjkkii renamed this task from Add support for unencoded Unicode URLs to eubaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii removed thiemowmde as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed a subscriber: gerritbot.
CommunityTechBot renamed this task from eubaaaaaaa to Add support for unencoded Unicode URLs.Jul 2 2018, 1:45 PM
CommunityTechBot assigned this task to thiemowmde.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot set the point value for this task to 3.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: gerritbot.
Lea_WMDE closed this task as Resolved.Jul 3 2018, 12:19 PM