Steps to Reproduce:
- Open any Chinese article under VisualEditor.
- Highlight any word and key "Ctrl + K"
Actual Results:
No searching result was displayed.
Expected Results:
Able to display the matched article in website.
Steps to Reproduce:
Actual Results:
No searching result was displayed.
Expected Results:
Able to display the matched article in website.
Uncaught TypeError: Cannot read property 'replace' of undefined at parse (<anonymous>:442:810) at new Title (<anonymous>:444:501) at MwWidgetsTitleSearchWidget.mw.widgets.TitleWidget.getOptionWidgetData (<anonymous>:276:874) at MwWidgetsTitleSearchWidget.mw.widgets.TitleWidget.getOptionsFromData (<anonymous>:276:619) at <anonymous>:281:751 at fire (load.php?lang=zh&modules=ext.quicksurveys.init|ext.uls.compactlinks|jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui|mediawiki.ui.button&skin=vector&version=hjs7u:55) at Object.add [as done] (load.php?lang=zh&modules=ext.quicksurveys.init|ext.uls.compactlinks|jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui|mediawiki.ui.button&skin=vector&version=hjs7u:55) at MwWidgetsTitleSearchWidget.mw.widgets.TitleSearchWidget.onQueryChange (<anonymous>:281:589) at OoUiSearchInputWidget.OO.EventEmitter.emit (<anonymous>:334:483) at OoUiSearchInputWidget.OO.ui.InputWidget.setValue (load.php?lang=zh&modules=ext.quicksurveys.init|ext.uls.compactlinks|jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui|mediawiki.ui.button&skin=vector&version=hjs7u:282)
The cause of this error is the method Array.prototype.intersects defined in https://zh.wikipedia.org/wiki/MediaWiki:Common.js/edit.js. When you define a method like this, it appears as if it was an array element when iterating using for ( … in … ), which then causes confusing exceptions. The easiest way to fix it would be to change it to a local method (it doesn't appear to be used outside of that file).