Page MenuHomePhabricator

Syntax error when editing user script
Closed, InvalidPublic

Description

As soon as I preview a user script, I get a syntax error. Here are the details:

phab bug part 1.PNG (864×1 px, 47 KB)

As seen above, the user script toolbar does not load, and it is not because of a script that I have in there. I have been able to preview this particular user script without any trouble.

The second part is that I am getting a syntax error if I look in the developer console:

phab bug part 2.PNG (152×1 px, 16 KB)

When I click on the file and line number, it takes me to a line that reads:

mw.loader.load(["ext.codeEditor","mediawiki.action.edit","mediawiki.toolbar","mediawiki.action.edit.editWarning","wikibase.client.action.edit.collapsibleFooter","mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.startup","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.page.watch.ajax","ext.charinsert","ext.gadget.CentralAuthInterlinkFixer","ext.gadget.wm-portal-preview","ext.gadget.addMe","ext.gadget.formWizard","ext.gadget.susaresources","ext.gadget.aaq","ext.gadget.wrcEditor","ext.gadget.wrcCollapsible","ext.gadget.ReferenceTooltips","ext.gadget.wrcAddNewIndividual","ext.gadget.wrcAddNewGroup","ext.gadget.CurIDLink","ext.centralauth.centralautologin.clearcookie","ext.CodeMirror","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.init","ext.eventLogging.subscriber","ext.wikimediaEvents","ext.wikimediaEvents.loggedin","ext.navigationTiming","ext.uls.eventlogger","ext.uls.init","ext.uls.compactlinks","ext.uls.interface","ext.3d","ext.centralNotice.geoIP","ext.centralNotice.startUp","skins.timeless.js","skins.timeless.mobile"]);});

That is all I have.

Event Timeline

Aklapper changed the task status from Open to Stalled.Aug 24 2018, 8:37 AM
Aklapper removed a project: JavaScript.

Please follow https://www.mediawiki.org/wiki/Help:Locating_broken_scripts and report back.
Furthermore, please follow https://mediawiki.org/wiki/How_to_report_a_bug and provide exact steps to reproduce. "A user script" on some unknown website does not allow anyone to try to reproduce the problem. Thanks!

@Aklapper: this is on meta.wikimedia.org. And actually, I just realize that it is a side effect of another of the scripts I wrote, so closing this task as invalid.