Page MenuHomePhabricator

CX alignment issue when translating the article [[HTML]] from Finnish
Closed, ResolvedPublic

Description

Seems to be related to references somehow.

Event Timeline

Nikerabbit raised the priority of this task from to Needs Triage.
Nikerabbit updated the task description. (Show Details)
Nikerabbit added a project: ContentTranslation.
Nikerabbit added a subscriber: Nikerabbit.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 11 2015, 12:17 PM
Amire80 renamed this task from CX alignment issue when translating HTML from Finnish to CX alignment issue when translating the article [[HTML]] from Finnish.Sep 12 2015, 1:10 PM
Amire80 triaged this task as High priority.
Amire80 set Security to None.
Amire80 moved this task from Needs Triage to CX6 on the ContentTranslation board.

The reference section in that page has an unusual id for references
id is viitteet-malline

From aligner, mw.cx.getSourceSection('viitteet-malline') is retuning [] and there goes the alignment.

We have a sanity check

               // Sanity check, id should be either a number or prefixed with mw
		if ( !id || ( isNaN( id ) && id.indexOf( 'mw' ) !== 0 ) ) {
			return $( [] );
		} else {
			return $( document.getElementById( id ) );
		}

Is there a reason to do this check now? @Nikerabbit?

I thought we added our own id's for everything we want to reference? For references it is important that we do not display html that is under user control.

I thought we added our own id's for everything we want to reference

We use the ids generated by parsoid. We no longer generate ids for sections

For references it is important that we do not display html that is under user control.

We need to display the references section. The wrong assumption about ids is making the published content broken for pages that use Malline:Viitteet - because the sanity check code breaks the correspondence of the sections

Change 241624 had a related patch set uploaded (by Santhosh):
Relax section id validations in mw.cx.getSourceSection and getTranslationSection

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

Change 241624 merged by jenkins-bot:
Relax section id validations in mw.cx.getSourceSection and getTranslationSection

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

santhosh moved this task from In Review to QA on the LE-CX6-Sprint break board.Sep 30 2015, 3:25 AM
Arrbee added a subscriber: Arrbee.Sep 30 2015, 5:31 AM

Doesn't seem to happen any more.

Arrbee moved this task from QA to Done on the LE-CX6-Sprint break board.Sep 30 2015, 5:31 AM
Amire80 added a subscriber: Amire80.Oct 1 2015, 8:32 PM

Mmm... it may be better, but I still don't see it perfectly:

Amire80 moved this task from CX6 to CX7 on the ContentTranslation board.Oct 1 2015, 8:32 PM
santhosh closed this task as Resolved.Oct 6 2015, 9:34 AM
Amire80 moved this task from CX7 to CX6 on the ContentTranslation board.Oct 19 2015, 8:23 AM