Page MenuHomePhabricator

Gadget ZoomViewer on Commons throws jQuery error work for file names with quotation marks
Closed, InvalidPublic

Description

Reported on c:Commons:Forum:

Annotatations are not shown for files with quotation marks in the file name.

Example: File:Flickr - europeanpeoplesparty - "I Struggle, I Overcome" - book launch (78).jpg (the preview shows the annotations)

Sizzle error message: Syntax error, unrecognized expression: #file img[alt="File:Flickr_-_europeanpeoplesparty_-_"I_Struggle,_I_Overcome"_-_book_launch_(78).jpg"]

Event Timeline

Thgoiter raised the priority of this task from to Needs Triage.
Thgoiter updated the task description. (Show Details)
Thgoiter subscribed.
Thgoiter set Security to None.
Krenair claimed this task.
Krenair subscribed.

Sounds like a gadget issue rather than an issue with the gadgets extension

I don't see how this is related to the code in the Gadgets extension either.

Going to https://commons.wikimedia.org/wiki/File:Flickr_-_europeanpeoplesparty_-_%22I_Struggle,_I_Overcome%22_-_book_launch_%2878%29.jpg?debug=true that error is triggered by jQuery which is https://commons.wikimedia.org/w/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=ok2tSBsQ in line 1496:

Sizzle.error = function( msg ) {
	throw new Error( "Syntax error, unrecognized expression: " + msg );
};
Aklapper renamed this task from Gadget ImageAnnotator does not work for file names with quotation marks to Gadget ImageAnnotator on Commons throws jQuery error work for file names with quotation marks.Oct 6 2015, 10:03 AM
Aklapper removed Krenair as the assignee of this task.

"Sounds like" or "Is" ?

Your title started with "Gadget ImageAnnotator on Commons", so... :)

My browser tells me that the error is in the zoomviewer gadget, and really: https://commons.wikimedia.org/wiki/MediaWiki:Gadget-ZoomViewer.js there it is (line 11). Please ask a sysop on Commons to escape the double quotes in the page name when building the attribute selector.

Aklapper renamed this task from Gadget ImageAnnotator on Commons throws jQuery error work for file names with quotation marks to Gadget ZoomViewer on Commons throws jQuery error work for file names with quotation marks.Oct 6 2015, 10:57 AM