Page MenuHomePhabricator

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

Description

Seems to be related to references somehow.

cx-lines1.png (715×1 px, 70 KB)

Event Timeline

Nikerabbit raised the priority of this task from to Needs Triage.
Nikerabbit updated the task description. (Show Details)
Nikerabbit subscribed.
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

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

צילום מסך מ־2015-10-01 23:31:36.png (900×1 px, 196 KB)