Page MenuHomePhabricator

AbuseFilter messages shown by VisualEditor cross-wiki uploads erroneously link to local wiki
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • log in to de.wikipedia.org and go to any page (e.g. Hannover)
  • click "Bearbeiten" to get to the interactive edit page (alternatively use a direct link e.g. https://de.wikipedia.org/w/index.php?title=Hannover&veaction=edit )
  • click the "Einfügen" (Insert) button and choose "Bilder und Medien" (Images and media)
  • go to tab "Hochladen" (Upload); upload the image and click upload
  • fill the form accordingly
  • click "Save"

What happens?:

Now there appears a hint telling you you cannot directly upload due to insufficient rights (probably dependent on the account; Screenshot see below). This hint is localised in language (i.e. German) but the link is a mix. The domain is German (i.e. de.wikipedia.org) but the magic link is not (i.e. /wiki/Special:UploadWizard). Hence the page doesn't exist.

The given link is https://de.wikipedia.org/wiki/Special:UploadWizard

What should have happened instead?:

The correct link would probably be https://de.wikipedia.org/wiki/Spezial:Hochladen and should be displayed.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • Tested with Firefox 142.0.1 with Plenty of addons
  • Screenshot:
    Screenshot_form.png (635×496 px, 37 KB)
  • I'd guess the bug exists for other languages, too.

See also: T165887, T89916

Details

Event Timeline

Pppery subscribed.

https://de.wikipedia.org/wiki/Special:UploadWizard should work. I have no idea why it isn't.

(Edit: this is wrong, I was confused by T404519)

Pppery renamed this task from Link in hint in interactive upload dialoge is not localised and does not work on de.wikipedia.org to AbuseFilter warning messages shown by VisualEditor cross-wiki uploads should be parsed in the context of Commons not the local wiki.Sep 14 2025, 3:13 PM
Pppery renamed this task from AbuseFilter warning messages shown by VisualEditor cross-wiki uploads should be parsed in the context of Commons not the local wiki to AbuseFilter messages shown by VisualEditor cross-wiki uploads should be parsed in the context of Commons not the local wiki.
Pppery edited projects, added AbuseFilter; removed Commons, UploadWizard.

To clarify, the message is parsed in the context of Commons (and not the local wiki), so e.g. Commons's message overrides and templates are used; but the parsing produces relative links (e.g. <a href="/wiki/...">), so when the message is shown while you're viewing the the local wiki, those links are incorrect. The links need to be expanded into absolute links (e.g. <a href="https://commons.wikimedia.org/wiki/...">) before displaying the message. So this is indeed exactly like T89916, but not like T165887 (which actually parses in the context of the wrong wiki).

Similarly to T89916, you can work around this bug by using interwiki links (or external links) in the message. I suggested doing that on-wiki: https://commons.wikimedia.org/wiki/MediaWiki_talk:Abusefilter-disallowed-cross-wiki-upload#Link_to_Special:UploadWizard_doesn't_work_when_this_error_is_displayed_inside_the_editor

Pppery renamed this task from AbuseFilter messages shown by VisualEditor cross-wiki uploads should be parsed in the context of Commons not the local wiki to AbuseFilter messages shown by VisualEditor cross-wiki uploads erroneously link to local wiki.Sep 15 2025, 3:43 PM

Similarly to T89916, you can work around this bug by using interwiki links (or external links) in the message. I suggested doing that on-wiki: https://commons.wikimedia.org/wiki/MediaWiki_talk:Abusefilter-disallowed-cross-wiki-upload#Link_to_Special:UploadWizard_doesn't_work_when_this_error_is_displayed_inside_the_editor

Done (which means the task isn’t immediately reproducible anymore, though it should still be fixed).

The links need to be expanded into absolute links (e.g. <a href="https://de.wikipedia.org/wiki/...">) before displaying the message.

Do you mean <a href="https://commons.wikimedia.org/wiki/..."> or am I confused? ^^

Yes, that's what I meant, sorry.

Change #1215692 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Api: Expand local links in html error format

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

Change #1215692 merged by jenkins-bot:

[mediawiki/core@master] Api: Expand local links in html error format

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

Umherirrender claimed this task.
Umherirrender removed a project: Patch-For-Review.