The XFDcloser gadget on enwiki (https://en.wikipedia.org/wiki/MediaWiki:Gadget-XFDcloser-core.js) sometimes raises an error: Parse error: Unexpected: ( on line 21.
Steps:
- Try mw.loader.load('ext.gadget.xfdcloser-core') or mw.loader.load('ext.gadget.xfdcloser-core-beta').
The error is generally not reproducible. But once it happens, it occurs consistently on the same skin/browser/device.
Users have reported https://en.wikipedia.org/w/load.php?lang=en&modules=ext.gadget.XFDcloser-core&skin=vector&version=m2csj to at times emit the following:
mw.loader.impl(function(){return["ext.gadget.XFDcloser-core@30cwo",function($,jQuery,require,module){mw.log.error("Parse error: Unexpected: ( on line 21"); },{"css":[".xfdc-status{font-size:small;margin-left:13px;font-weight:normal}.skin-timeless .xfdc-status{font-size:0.98rem}.skin-minerva .xfdc-status{font-size:0.98rem;display:block;margin:-1rem 0 1rem}.xfdc-action{font-weight:normal}.xfdc-action a{cursor:pointer}.xfdc-qc-cancel{cursor:pointer;border:1px solid #777;border-radius:10px;font-weight:bold;font-size:90%;color:#777;padding:0;margin:0 1px} .xfdc-old .xfdc-action{background-color:#c6ffc6}.xfdc-notOld .xfdc-action{background-color:#ffc6c6}.xfdc-unknownAge .xfdc-action{background-color:#ffffc6}.xfdc-notOld.xfdc-relisted .xfdc-action{background-color:#ffe9c6} .xfdc-actioned-heading{text-decoration:line-through double black;opacity:75%}.xfdc-actioned-discussion{opacity:50%} html body.ooui-draggbleWindow-open{position:unset;overflow:unset;margin-right:unset !important; }html body.ooui-draggbleWindow-open .oo-ui-windowManager-modal \u003E .oo-ui-dialog.oo-ui-window-active{position:static;padding:0} html body.ooui-draggbleWindow-open .oo-ui-dialog.oo-ui-window-active \u003E div{z-index:110;transition:all 0.25s ease-out 0s,transform 0s !important} .oo-ui-textInputWidget.oo-ui-textInputWidget-labelPosition-before.padLeft2em .oo-ui-inputWidget-input{padding-left:2em !important}.oo-ui-textInputWidget.oo-ui-textInputWidget-labelPosition-before.padLeft4em .oo-ui-inputWidget-input{padding-left:4em !important} .xfdc-menuOptionWidget.oo-ui-decoratedOptionWidget{padding:7px 12px} .xfdc-taskItemWidget \u003E .oo-ui-fieldLayout-messages{clear:both} #XFDcloser-showhide{bottom:0;display:block;position:fixed;right:0;z-index:100;padding:5px;box-shadow:0 2px 4px rgba(0,0,0,0.5);background-color:#fef9e6;border:1px solid #aaa;border-radius:5px;font-size:85%}"]}];});
As the JS code of the gadget is replaced with a Parse error: Unexpected: ( on line 21, this is clearly caused by failure of Peast validation. The consistent occurrences after the first occurrence can be explained by the incorrect validation result getting cached.
However, attempting to run Peast locally on the gadget consistently passes.
Original discussion: https://en.wikipedia.org/wiki/Wikipedia_talk:XFDcloser#Loading_problem