Page MenuHomePhabricator

Error when using search in CodeEditor: dom.buildDom is not a function
Closed, InvalidPublic

Description

When clicking on the search icon in the CodeEditor toolbar on a meta Schema: page, I get this error:

Uncaught TypeError: dom.buildDom is not a function
    at new SearchBox (ext-searchbox.js:167)
    at Object.exports.Search (ext-searchbox.js:503)
    at <anonymous>:313:178
    at AppConfig.exports.loadModule (load.php?lang=en&modules=ext.codeEditor.ace&skin=vector&version=jdvb4:94)
    at Object.toggleSearchReplace [as execute] (<anonymous>:313:133)
    at Object.doAction (load.php?lang=en&modules=ext.wikiEditor&skin=vector&version=118ou:18)
    at load.php?lang=en&modules=ext.wikiEditor&skin=vector&version=118ou:20
    at OoUiToggleButtonWidget.OO.EventEmitter.emit (<anonymous>:574:483)
    at OoUiToggleButtonWidget.OO.ui.mixin.ButtonElement.onClick (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=vector&version=oklq0:181)
    at HTMLAnchorElement.dispatch (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets|jquery.ui&skin=vector&version=oklq0:69)

Event Timeline

I am not able to bring up the search and replace dialog in CodeEditor in the English Wiktionary modules that I'm currently editing, either by pressing Ctrl+F or by clicking the icon in the toolbar. This is very troublesome and annoying because I normally constantly use the search and replace dialog to jump to the right place in the code.

In the earlier version of this comment, I said my console didn't show the error message, but it had been set to not show errors, probably due to a software update. Now it's there.

I get this behavior sometimes, but at other times the search panel shows up and works. It doesn't seem random, not sure what it depends on though.

The problem has disappeared for me (the search and replace dialog shows up again), maybe at the same time that diffs became monospace again.

To further clarify:
the code in question (search and replace), is not loaded via RL, but dynamically loaded by ACEs own module loader and thus you can have a newer version of core ACE, trying to load a web cached old version of a JS file. This is less than ideal, but should only occur with some more rare optional loaded parts of CodeEditor. We could of course just add that ext-searchbox.js file to the ext.codeEditor.ace module and ship the code always.

Sounds like this was not an issue with the code, then. Not sure if improving the custom module loading is worth its own task.