Page MenuHomePhabricator

Missing file error links to the main namespace without "File:"
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:
"Example.oggz" in the error message is linked to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Example.oggz&action=edit&redlink=1, a nonexistent page in the main namespace.

What should have happened instead?:
"Example.oggz" in the error message is linked to https://en.wikipedia.org/wiki/Special:Upload?wpDestFile=Example.oggz, the same as the attribution link (โ“˜).

QA Results - Beta

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald Transcript

Caused by:
$wikitextLink = '[[' . $options['file'] . ']]';

This is worse when the error is "File '...' is not an audio file", as seen here. The error is that the file type doesn't match but it looks like a missing file.

Change 965152 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] Phonos: Fix file error link

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

Change 965152 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: Fix file error link

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

@TheresNoTime Links don't match between the error message and the attribution link (โ“˜) as seen in the screenshots below.

Status: โŒFail
Environment: Beta: 1.42.0-alpha (d5ff499)
OS: macOS Sonoma 14.0
Browser: Chrome 117
Device: MBA M2
Emulated Device:: n/a
Test Links:
https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_Errors

โŒAC1: https://phabricator.wikimedia.org/T348593

Error Link(โ“˜) Link
2023-10-25_12-16-45.png (1ร—2 px, 273 KB)
2023-10-25_12-16-25.png (1ร—2 px, 266 KB)

@GMikesell-WMF ack, thank you โ€” I'm going to ask for opinions on if this is desired behaviour, as afaik LinkRenderer (which creates the missing file upload link) returns HTML and the error popup just accepts wikitext (and thus renders the broken file link as just that)

@Nardog any suggestions on this? Should both the red link in the error popup and the attribution link go to the file upload page?

@Nardog any suggestions on this? Should both the red link in the error popup and the attribution link go to the file upload page?

I believe it should, in that both links should be consistent with whatever [[File:<nonexistent filename>]] yields (which currently is /wiki/Special:Upload?wpDestFile=...).

Linking to the creation of the description for a file that doesn't exist does little to help resolve the error. Even simply not linking the missing filename to anything would be an improvement, although that's obviously not desirable when the file exists but isn't audio.

Change 973774 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/Phonos@master] Phonos: Add plain() message for missing file upload

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

Change 975395 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/extensions/Phonos@master] Remove namespace prefix in popup message

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

Change 976309 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/core@master] Make function Linker::getUploadUrl public

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

Change 976309 merged by jenkins-bot:

[mediawiki/core@master] Make function Linker::getUploadUrl public

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

Change 973437 had a related patch set uploaded (by Samtar; author: Fomafix):

[mediawiki/extensions/Phonos@master] Generate error messages on client side

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

Change 973437 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Generate error messages on client side

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

Change 973774 abandoned by Samtar:

[mediawiki/extensions/Phonos@master] Phonos: Add plain() message for missing file upload

Reason:

I4109a5bae4f42ad3b3767864473e49f0a2bdb677 & chain

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

Change 975395 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Improve the links in the popup message

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

@TheresNoTime Links now do match between the error message and the attribution link (โ“˜) as seen in the screenshots below. How come Safari does not show links at all compared to Chrome/Firefox/Edge as seen in the .webm? If you want me to create a separate task, just let me know, otherwise I'm moving this to Done since the links do match. Thanks for all your work!

Status: โœ… PASS
Environment: Beta: 1.42.0-alpha (6e1bca9)
OS: macOS Sonoma 14.3
Browser: Chrome 121, Firefox 123, Safari 17.3, Edge 121
Device: MBA M2
Emulated Device:: n/a
Test Links:
https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_Errors

โœ…AC1: https://phabricator.wikimedia.org/T347682

Chrome/Edge/Firefox

Error Link(โ“˜) Link
2024-02-15_09-17-52.png (1ร—2 px, 232 KB)
2024-02-15_09-19-21.png (1ร—2 px, 230 KB)

Safari Error- Shows Chrome first then Safari after