Page MenuHomePhabricator

en.wp's MediaWiki:RefToolbar.js does not show any citation templates due to TypeError
Closed, ResolvedPublic

Description

When I am editing a Wikipedia article, and click the citation dropdown>Template, and any citation template, the space where citation info would go is comp blank. Looks like a bug has removed all data.

Event Timeline

Shreerajtheauthor raised the priority of this task from to Needs Triage.
Shreerajtheauthor updated the task description. (Show Details)
Shreerajtheauthor added a project: Cite.
Shreerajtheauthor subscribed.
Aklapper claimed this task.

Hi @Shreerajtheauthor. Thanks for taking the time to report this.

I assume this is about English Wikipedia and the classic Wikieditor (not VisualEditor).

Using any web browser's developer tools, it's shown that https://en.wikipedia.org/wiki/MediaWiki:RefToolbar.js triggers the error TypeError: CiteTB.getOpenTemplate(...) is undefined.

User scripts and gadgets are local features and managed on wiki. Phabricator/Maniphest is used for MediaWiki, MediaWiki extensions, or server configuration. You could contact the author(s) of the script, comment on the talkpage of the script, or ask for help on the English Wikipedia Technical Village Pump

Closing as INVALID here in Phabricator as this is a matter to discuss and fix on the local wiki and unfortunately not handled in Phabricator/Maniphest.

Aklapper renamed this task from Citation issue to en.wp's MediaWiki:RefToolbar.js does not show any citation templates due to TypeError.Aug 21 2015, 1:17 PM
Aklapper set Security to None.
Aklapper added a subscriber: Deku-shrub.

For future reference, if you want to debug such problems yourself (because everybody can):

You can open your browser's console (or whatever it is called in your browser) and reload the page that you see the problem on. If there is a problem or an error with JavaScript it should be printed in that console.
For more information see:

According to https://en.wikipedia.org/w/index.php?title=MediaWiki:RefToolbar.js&action=history , the Javascript here hasn't been changed since November 2014. So that can't be the problem here. Something must have changed elsewhere?

I suspect this is a regression due to Change Ia7ad5aaa9cac429d1c9d706bdf6760e3eda358bc

That change makes the somewhat reasonable assumption that .html of a dialog is a string, but Reftoolbar is feeding it jQuery elements.

Moving this to 'high' priority since this is directly affecting content edits.

Change 233064 had a related patch set uploaded (by TheDJ):
Dialogs: handle jQuery content for dialogs

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

Thanks! Edit made, and everything seems to be working OK again now!

Can this change be merged into MediaWiki?

Can this change be merged into MediaWiki?

See https://phabricator.wikimedia.org/T109781#1562241 - code change is currently awaiting review (and merge) in Gerrit.

Thanks! to all who contributed to getting this fixed.

Change 233064 merged by jenkins-bot:
Dialogs: handle jQuery content for dialogs

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