Page MenuHomePhabricator

[CX-OOJS] Syntax error, unrecognized expression: unsupported pseudo: 0_3-0
Closed, ResolvedPublic

Description

To reproduce:

  • Open JS console.
  • Translate "Awkwafina" from English to Spanish. Use debug=true in the URL.
  • Translate the paragraph that begins with the words "Born to a first-generation"

Observed:

Error: Syntax error, unrecognized expression: unsupported pseudo: 0_3-0  load.php:1496:8
	Sizzle</Sizzle.error http://cx3.wmflabs.org/load.php:1496:8
	Sizzle</Sizzle.selectors.filter.PSEUDO http://cx3.wmflabs.org/load.php:1803:6
	matcherFromTokens http://cx3.wmflabs.org/load.php:2346:14
	Sizzle</Sizzle.compile http://cx3.wmflabs.org/load.php:2488:13
	Sizzle</Sizzle.select http://cx3.wmflabs.org/load.php:2574:16
	Sizzle http://cx3.wmflabs.org/load.php:893:9
	.find http://cx3.wmflabs.org/load.php:2733:4
	mw.cx.ui.ReferenceTranslationUnit.prototype.getTranslationSection http://cx3.wmflabs.org/extensions/ContentTranslation/modules/ui/translationunits/mw.cx.ui.ReferenceTranslationUnit.js:43:9
	mw.cx.ui.ReferenceTranslationUnit.prototype.init http://cx3.wmflabs.org/extensions/ContentTranslation/modules/ui/translationunits/mw.cx.ui.ReferenceTranslationUnit.js:30:29
	mw.cx.ui.ReferenceTranslationUnit.prototype.onParentTranslationStarted http://cx3.wmflabs.org/extensions/ContentTranslation/modules/ui/translationunits/mw.cx.ui.ReferenceTranslationUnit.js:39:2
	oo.EventEmitter.prototype.emit http://cx3.wmflabs.org/resources/lib/oojs/oojs.jquery.js:775:5
	mw.cx.ui.SectionTranslationUnit.prototype.setContent http://cx3.wmflabs.org/extensions/ContentTranslation/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js:104:2
	mw.cx.ui.SectionTranslationUnit.prototype.onClick http://cx3.wmflabs.org/extensions/ContentTranslation/modules/ui/translationunits/mw.cx.ui.SectionTranslationUnit.js:89:2
	.proxy/proxy http://cx3.wmflabs.org/load.php:548:11
	jQuery.event.dispatch http://cx3.wmflabs.org/load.php:4669:15
	jQuery.event.add/elemData.handle http://cx3.wmflabs.org/load.php:4338:6

Tested on CX3 with CX version bf790a5 on Firefox.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

The familiar issue. We really need to get into habit of not using #-selector with variable input.

	return this.parentTranslationUnit.$translationSection.find( '#' + this.model.sourceDocument.id );
Arrbee triaged this task as Medium priority.Apr 5 2017, 6:52 AM
santhosh claimed this task.
santhosh subscribed.

This method was removed and moved to parent class. And it now uses ['id="xyz"'] pattern. Also verified that the js error not happening to the above title and language pair in CX2