Page MenuHomePhabricator

How to distinguish duplicate errors in <references>?
Open, Needs TriagePublic

Description

While working on other tasks related to error messages in Cite (e.g. T202593) we learned that what should be a purely technical code cleanup will have an effect that might or might not be considered user-facing, depending on how you want to argue.

Here is an example you can test on e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:MyPage:

<references>
<ref></ref>
<ref></ref>
<ref name=a></ref>
<ref name=a></ref>
<ref name=b>b</ref>
<ref name=b>b</ref>
</references>

This creates 6 error messages: 2 identical "<ref> in this context must have a name", 2 identical "<ref> in this context must have content", and 2 identical "<ref> in this context cannot be unused".

The planned code cleanup in https://gerrit.wikimedia.org/r/982355 would remove the duplicates.

Possible arguments:

  1. The duplicates are useless. We don't really loose anything when we remove them. The only thing that gets lost is the fact that there is more than one <ref> with the same error.
  2. However, what can the user do with this information? There is no way to address the duplicates individually. Using an index position (e.g. "the third <ref> from the top") is probably not helpful, especially because it will conflict with how the rest of the references on the page is numbered.
  3. If we want to help the user clean up duplicates we need another error message that says that. But that wouldn't be a blocker for the Technical-Debt cleanup.
  4. Maybe it's possible to improve the existing error messages. But that's a separate project that already has separate tickets, and not a blocker for the Technical-Debt cleanup as well.
  5. …?

Event Timeline

The duplicates are useless. We don't really loose anything when we remove them. The only thing that gets lost is the fact that there is more than one <ref> with the same error.

I don't want to have to preview/save to see that I have another error and moreover one which looks the same as the previous one I may have just fixed. I'd rather see two to start so that I know going in how much time a cleanup will take.

If we want to help the user clean up duplicates we need another error message that says that. But that wouldn't be a blocker for the Technical-Debt cleanup.

That says there are duplicate bad refs? That's a useless error to me. I otherwise agree that it's not a blocker.

Maybe it's possible to improve the existing error messages. But that's a separate project that already has separate tickets, and not a blocker for the Technical-Debt cleanup as well.

Agreed, not relevant.