Page MenuHomePhabricator

Addition or deletion of in references in source article while translation is on-going cause references in translation point to non-existing reference
Closed, ResolvedPublic1 Story Points

Description

Addition or deletion of in references in source article while translation is on-going cause references in translation point to non-existing reference. It also cause publishing error because of this.

We found a case while debugging https://phabricator.wikimedia.org/T109255
While translating enwiki:ISKCON Temple Bangalore, somebody added a new reference to the source article https://en.wikipedia.org/w/index.php?title=ISKCON_Temple_Bangalore&type=revision&diff=676749674&oldid=676117549.

The reference listing changed to

	<li about="#cite_note-6" data-seqid="392" id="cite_note-6">
			<span class="cx-segment" data-segmentid="393">
				<a class="cx-link" data-linkid="394" href="#cite_ref-6" rel="mw:referencedBy">
					<span class="mw-linkback-text">↑ </span>
				</a>
				<span class="mw-reference-text" id="mw-reference-text-cite_note-6"><a class="cx-link" data-linkid="395" href="http://www.iskconbangalore.org/deity" id="mweA" rel="mw:ExtLink">ISKCON Temple Bangalore website, Deities page</a>.</span>
			</span>
		</li>

But in translation, it was pointing to mw-reference-text-cite_note-5

<span about="#mwt12" class="mw-ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-5&quot;},&quot;attrs&quot;:{}}" id="cxcite_ref-5" rel="dc:references" typeof="mw:Extension/ref" contenteditable="false"
			data-sourceid="cite_ref-5">
				<a href="#cite_note-5" style="counter-reset: mw-Ref 5;">
					<span class="mw-reflink-text">[5]</span>
				</a>
			</span>

This caused the following error in parsoid:

extension src id mw-reference-text-cite_note-5 points to non-existent element for:  <span about="#mwt12" class="mw-ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-5&quot;},&quot;attrs&quot;:{}}" id="cxcite_ref-5" rel="dc:references" typeof="mw:Extension/ref" contenteditable="false" data-sourceid="cite_ref-5">
				<a href="#cite_note-5" style="counter-reset: mw-Ref 5;">
					<span class="mw-reflink-text">[5]</span>
				</a>
			</span>

I guess we will require a validation about this before publishing.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : wmf/1.26wmf19Validate the references when restored from draft
mediawiki/extensions/ContentTranslation : wmf/1.26wmf18Validate the references when restored from draft
mediawiki/extensions/ContentTranslation : masterValidate the references when restored from draft

Event Timeline

santhosh raised the priority of this task from to Needs Triage.
santhosh updated the task description. (Show Details)
santhosh added a subscriber: santhosh.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2015, 11:04 AM
Amire80 moved this task from Needs Triage to CX6 on the ContentTranslation board.Aug 19 2015, 11:17 AM

Change 232680 had a related patch set uploaded (by Santhosh):
Validate the references when restored from draft

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

santhosh claimed this task.Aug 20 2015, 5:03 AM
santhosh edited projects, added LE-CX6-Sprint 2; removed LE-CX6-Sprint 3.
santhosh set Security to None.
santhosh moved this task from Backlog to In Review on the LE-CX6-Sprint 2 board.
santhosh edited a custom field.

Change 232680 merged by jenkins-bot:
Validate the references when restored from draft

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

Change 232729 had a related patch set uploaded (by KartikMistry):
Validate the references when restored from draft

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

Change 232730 had a related patch set uploaded (by KartikMistry):
Validate the references when restored from draft

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

Change 232729 merged by jenkins-bot:
Validate the references when restored from draft

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

Change 232730 merged by jenkins-bot:
Validate the references when restored from draft

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

Arrbee moved this task from In Review to Done on the LE-CX6-Sprint 2 board.Aug 21 2015, 7:13 AM
Arrbee closed this task as Resolved.Aug 25 2015, 6:44 AM
Arrbee added a subscriber: Arrbee.