Page MenuHomePhabricator

CX2: Improve support for references that are reused in multiple places
Open, HighPublic


References are often used in more than one paragraph. The common way to support this scenario is for one reference to include all the information and a name, while the rest just reference such name but contain no content.

Currently when dealing with such repeated references, Content Translation seems to create references that share the same name but all of them contain the reference details.

This results in the following issue on the references list (view in article):

Screen Shot 2018-09-07 at 11.35.00.png (176×877 px, 57 KB)

This issue was found when translating Extreme ironing from English to Spanish. In the wikitext for the published article captured below you can notice the two references named "Jazz", both containing the reference details.

Screen Shot 2018-09-07 at 11.52.21.png (512×882 px, 190 KB)

Fixing the issue required to manually remove the details from one of the instances.

It is worth noting that it does not seem to be possible to fix this issue from Visual Editor, where both references appear with the usual inspector, no information is show on the name used, and the list of references shows no errors:

Screen Shot 2018-09-07 at 11.54.38.png (332×881 px, 123 KB)

Event Timeline

Pginer-WMF triaged this task as Medium priority.Sep 7 2018, 10:00 AM

This was mentioned in this comment:

Pel que he observat (però és que no sempre és igual), té tendència a repetir tot el text de la referència quan només hi hauria de fer una menció.

Which translates into English roughly as:

From my observations (not consistently repeated), the whole text of the reference tends to be repeated when it should just make a mention.

With the latest code, it is not possible to have different content for references with same name:

image.png (271×961 px, 84 KB)

Editing one will cause the same changes propagated to the second. Because of this the issue that shows red color error about "multiple times with different content" was not able to reproduce to me. The published content looked like as follows:

image.png (224×747 px, 35 KB)

But the issue of reference content repeated in wikitext remains.
@Esanders is there a way we can reconcile the reference content so that before publishing reference body is only in one reference and others are just reference by name?

Pginer-WMF raised the priority of this task from Medium to High.Jul 29 2019, 8:55 AM

I think when importing new content to the page you could check any references against the internal list for conflicting keys ( I don't think we've solved this problem before so it could be quite fiddly to fix, as most things to do with references are...

Pginer-WMF raised the priority of this task from Medium to High.Jul 12 2021, 10:20 AM