Page MenuHomePhabricator

Reply links are not showing up for a Project Talk page on hu.wiki
Closed, ResolvedPublic

Description

Reply links are not showing up for this Project Talk page on hu.wiki:

https://hu.wikipedia.org/wiki/Wikip%C3%A9dia-vita:Hadtudom%C3%A1nyi_m%C5%B1hely/Sablonok_%C3%A9s_konvenci%C3%B3k?dtenable=1

Browser:Chrome

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 21 2020, 11:17 PM

There's an error in the browser console:

Uncaught URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at Function.Uri.decode (<anonymous>:180:39)
    at <anonymous>:180:494
    at String.replace (<anonymous>)
    at Uri.parse (<anonymous>:180:350)
    at new Uri (<anonymous>:179:86)
    at getPageTitleFromUri (load.php?lang=hu&modules=ext.discussionTools.parser|jquery&skin=vector&version=16kac:6)
    at load.php?lang=hu&modules=ext.discussionTools.parser|jquery&skin=vector&version=16kac:7
    at Array.some (<anonymous>)
    at findSignature (load.php?lang=hu&modules=ext.discussionTools.parser|jquery&skin=vector&version=16kac:7)

This is the same problem as T106244. There's an external link to https://hu.wikipedia.org/w/index.php?title=Speci%E1lis:Mi_hivatkozik_erre/Sablon:Katona_infobox&limit=200&hidelinks=1 on that page (search for "[1]" near the bottom), and it's resulting in this exception, when our code looking for links to user page/talk checks it. We can just work around the bug with try…catch here.

JTannerWMF edited projects, added OWC2020 (OWC2020 Replying 1.0); removed OWC2020.

Assuming I'm correctly understanding this issue as meaning anytime a talk page contains a URL with an invalid/deprecated URL encoding character(s) [i], no reply links will be shown on the page, two resulting questions:

Two questions:

  • 1. @matmarex: in sharing the below are you suggesting this is [relatively] easy to fix?

We can just work around the bug with try…catch here

  • 2. @matmarex: in investigating T106244, did you uncover how common it is for URLs that contain invalid/deprecated URL encoding character(s) to appear on Wikipedia?

i. https://www.w3schools.com/tags/ref_urlencode.ASP

Yes, that's right.

  1. Yes, should be easy.
  2. No, but they should be rare, and should only appear in old discussions. I think URLs like this were generated by MediaWiki before version 1.5, when it was changed to use UTF-8 internally (https://www.mediawiki.org/wiki/Release_notes/1.5#What's_gone?). That was released in 2005, so they should mostly appear in discussions older than that. Note, however, that this particular comment is from 2009; the user might have had the page bookmarked or copied it from elsewhere or something.

Change 575708 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Work around mw.Uri crash on fallback encoding in links

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

Change 575708 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Work around mw.Uri crash on fallback encoding in links

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

JTannerWMF moved this task from Inbox to High Priority on the Editing QA board.Mar 7 2020, 12:10 AM
ppelberg closed this task as Resolved.Mar 11 2020, 3:46 PM
ppelberg claimed this task.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 11 2020, 3:46 PM