Steps to reproduce
- Open Special:PageMigration
- Search in the Textbox for the name of a page
Expected behavior
Pages starting with a similar name should be shown in the suggestion box.
Actual behavior
No suggestion box appears, and an error is logged in the console.
Additional info
Here's the error logged in the console,
Uncaught TypeError: Cannot read property 'indexOf' of undefined at getFormData (searchSuggest.js?ed05e:54)
This is happening because our HTML Form does not have an action attribute and getFormData expects an action attribute. See code from that function below,
baseHref = $form.attr( 'action' ); baseHref += baseHref.indexOf( '?' ) > -1 ? '&' : '?';
This seems to be only used for tracking purposes.
Couple of things could be done to fix this,
- Add an empty action attribute to the form in SpecialPageMigration.php
- Add a check in getFormData before doing indexOf ... which I think we should do either way.