Page MenuHomePhabricator

Improve error handling UX in the mw.ForeignStructuredUpload.BookletLayout
Closed, ResolvedPublic

Event Timeline

Jdforrester-WMF raised the priority of this task from to High.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF added a project: Multimedia.

Prateek wanted to work on it, apparently?

Change 242655 had a related patch set uploaded (by Prtksxna):
mediawiki.Upload.BookletLayout: Move error checking for uploadToStash to uploadFile

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

Change 242655 merged by jenkins-bot:
mw.Upload.BookletLayout: Move error checking for uploadToStash to uploadFile

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

Change 242717 had a related patch set uploaded (by Prtksxna):
mw.Upload.BookletLayout: Make all errors unrecoverable

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

Change 242723 had a related patch set uploaded (by Prtksxna):
mw.Upload.BookletLayout: Go back to upload page on upload error

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

Change 242717 merged by jenkins-bot:
mw.Upload.BookletLayout: Make all errors unrecoverable

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

Change 242723 merged by jenkins-bot:
mw.Upload.BookletLayout: Go back to upload page on upload error

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

Change 242899 had a related patch set uploaded (by Prtksxna):
mw.Upload: Add details of error when uploading to stash

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

Change 243144 had a related patch set uploaded (by Prtksxna):
mw.Upload.BookletLayout: Show errors and try to recover from warnings

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

Change 242899 merged by jenkins-bot:
mw.Upload: Add details of error when uploading to stash

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

Change 243144 merged by jenkins-bot:
mw.Upload.BookletLayout: Show errors and try to recover from warnings

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

Prtksxna moved this task from Needs code review to Done on the Multimedia board.

Sufficiently complete?

I think so.

I had mentioned this on Gerrit but then forgot about it. We are running into T55576: mediawiki.jqueryMsg double escapes HTML entities when using mw.message(key).parse() on a message containing a link and T49395: jqueryMsg can not parse wikilink with parameters in page name on a few error messages. It causes warnings in the console and the result look like this:

@matmarex mentioned on IRC that he'd be working on this soon. Not sure if we should re-open this task and mark the other bugs as blocking, or leave it as is.

Yeah, I can work on them some time this week.

Looking at the one in screenshot, I think that exhibits one more issue – jqueryMsg is not able to parse image syntax ([[File:Foo.jpg|thumb]]), and frankly I'm not sure if it should be able. We might need a separate message for this one, or to move the [[$1|thumb]] out of this message and to where it is actually used.

I think I figured out T49395 (patch pending review), and I think that T55576 is not actually an issue here.

Change 243887 had a related patch set uploaded (by Prtksxna):
mw.Upload.BookletLayout: Add a catch all error state

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

What is the reason for putting a : before the argument in filepageexists? In our case it just gets appended before the name.

What is the reason for putting a : before the argument in filepageexists? In our case it just gets appended before the name.

It's because of image thumbnail syntax. [[File:Docs.png]] would generate an embedded thumbnail (in the normal parser, jqueryMsg doesn't support that), [[:File:Docs.png]] generates a link to file page. The leading colon should be stripped, though…

Change 244226 had a related patch set uploaded (by Bartosz Dziewoński):
mediawiki.jqueryMsg: Strip leading colon in wikilinks

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

Change 243887 merged by jenkins-bot:
mw.Upload.BookletLayout: Add a catch all error state

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

Change 244226 merged by jenkins-bot:
mediawiki.jqueryMsg: Strip leading colon in wikilinks

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