Page MenuHomePhabricator

Nicer error handling for broken Cite references
Open, Needs TriagePublic8 Estimated Story Points

Description

Currently, the Cite extension will render loud, red errors in the middle of article content, if there are parsing errors in the attributes. This will become an issue if we have to roll back the extends attribute support.

The main goal would be that extends errors are displayed in a less obtrusive way. It's possible that we have to change how other errors are handled as well.

Don't break the article for readers, for example show the error in the "References" section rather than in the middle of content. But this should still be visible for editors. Maybe add a property or category to the page, to make it easily discoverable.

Example of current error display:

image.png (226×789 px, 21 KB)

Event Timeline

@awight: Assuming this task is about Cite, hence adding project tag so others can find this task when searching for tasks under that project or looking at that project workboard. Wondering how this task is related to T151305: More edge case handling for "extends" parameter? Duplicate? Dependency?

thiemowmde set the point value for this task to 8.Nov 26 2019, 12:33 PM
thiemowmde added a project: WMDE-TechWish.

During story time we found one scenario that concerns us: What if users are so used to certain errors shown where they are shown now, that moving the error will break their workflow?

We think we need more input fro UX people to find a good answer and a way forward.

From yesterdays story time about this ticket:

  • We had a look at all the different ways Cite is reporting errors. There are 3 or 4 different places an error message can show up. Often the context is entirely lost. E.g. a bad dir="x" results in the <ref> not being rendered at all, like it does not exist, resulting in many more confusing errors that have nothing to do with the bad dir.
  • We might start working on this in 3 steps:
    1. Check if it's possible to move some of the existing error messages down to the <references> section. Note this is only possible for error messages that do not make the code ditch the erroneous <ref>. It might be there are none of these.
    2. Make the code not ditch erroneous <ref>, but render a [1] footnote marker instead. Render these in the <references> section with the error message appended to the text if there was any, otherwise only the error message. Note: This should be done one error message at a time to keep patches and possible impact small.
    3. Make the erroneous [1] footnote markers stick out by coloring them red, or add a red exclamation mark icon. Ask WMDE-Design for a design. Note this last step is optional and should only be done if we can invest the resources.

#2 would be great since most errors at the end of the day do end up there
today.

Change #1081153 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Replace broken error when running out of backlink labels

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

Change #1081153 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Replace broken error when running out of backlink labels

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

This is a bigger issues that would need some thought work. Removing some redundant tags to make clear that we're currently not planing to work on it.

Change #1122550 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Re-classify one "details" validator error as a warning

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

Change #1122558 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] [POC] Re-classify invalid dir="…" attribute validation as warnings

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

Change #1122550 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-classify one "details" validator error as a warning

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

Change #1123275 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] [WIP] Turn many more Validator fatals into warnings

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

Change #1122897 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Move existing argument sanitization into the Validator

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

Change #1122897 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Move existing argument sanitization into the Validator

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

Change #1122558 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-classify invalid dir="…" attribute validation as warnings

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

Change #1128426 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Drop one more special case how errors can be reported

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

Change #1128426 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Drop one more special case how errors can be reported

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

Change #1142560 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Re-classify "invalid <ref> parameter" from fatal to warning

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

Change #1142574 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] [WIP] Re-classify "numeric <ref> name" from fatal to warning

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

Change #1142560 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-classify "invalid <ref> parameter" from fatal to warning

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

Change #1170498 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Re-classify "numeric <ref> name" from fatal to warning

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

Change #1170507 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Re-classify mismatching group from fatal to warning

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

Change #1170507 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-classify mismatching group from fatal to warning

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

Change #1170498 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Re-classify "numeric <ref> name" from fatal to warning

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

Change #1142574 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Cite@master] Re-classify numeric follow="…" from fatal to warning

Reason:

Superseded by I0792bb9.

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