Page MenuHomePhabricator

Confusing error message when main ref is defined in a template
Closed, ResolvedPublic

Description

Context

When the main reference is defined in a template and the reused with details by a sub-ref in the article, there's a message in the Context menu that the main content can not be displayed.

See this Wikitext

{{#tag:ref|The Book|name=book}}
<ref details="p. 2" name="book" />
<references />

In the Context menu of that sub-ref there's text then, that the main ref is "missing"

image.png (835×262 px, 23 KB)

These details are linked to a missing reference. Please remove them from the page or fix the issue in source mode.

Maybe it makes more sense to show a different message, that's also used for "normal" refs defined in a template

image.png (422×134 px, 14 KB)

This reference is defined in a template or other generated block, and for now can only be edited in source mode.

Challenge
  • Can we easily check if the main content is missing or coming from a template?
Update

After investigation, we found that VE cannot distinguish between a main ref defined in a template and a main ref with missing content.
In both cases the internal item node that stores the ref content is empty.
Therefore our suggestion is to change the error message to one that fits for both cases:
Eg: "These details are linked to a reference that is either missing, defined in a template or other generated block. Please edit in source mode. "
Putting this in PM/UX review to decide on how to proceed.

Acceptance Criteria
  • Change error to fit for both cases : "These details are linked to a reference that is either missing or defined in a template or other generated block. For now, it can only be fixed or edited in source mode."

Details

Event Timeline

Change #1307077 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] Update error message in VE

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

These details are linked to a reference that is either missing or defined in a template or other generated block. Please remove the details or fix the issue in source mode.

I think the last part is not quite what we want to communicate here because in most cases there's no problem where something needs to be removed.

I would suggest something like

These details are linked to a reference that is either missing or defined in a template or other generated block. For now, that content can only be fixed or edited in source mode.
Lina_Farid_WMDE subscribed.

updated text in the acceptance criteria based on your suggestion.

Change #1307077 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Update error message in VE

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