Steps to replicate the issue (include links if applicable):
- Add the following to LocalSettings.php:
wfLoadExtension( 'CodeMirror' ); $wgCodeMirrorV6 = true; $wgMainPageIsDomainRoot = true; // as this is not set on WMF wikis, it probably only affects third-party wikis
- Open the source editor for the main page of the wiki
- CTRL + F to open the CodeMirror search box
- Type something into the search box
- Click "Save Changes" with the search box still open
What happens?:
The page redirects to the search results page for the term you entered into CodeMirror's search box. This is because the search box in CodeMirror is an <input> with name="search", so when the page is POSTed, some legacy code in MediaWiki core sees the search parameter and tries to search the wiki, aborting the page save.
A possible solution is changing the name of CodeMirror's parameter, but this would require modifying the upstream CodeMirror V6 library. I think that a wiser change to fix this is to modify ActionEntrypoint.php in core to only perform this legacy search functionality if the request was not POSTed.
What should have happened instead?:
The edit should have been saved, and the user should be redirected to the page that they just edited.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
1.45
Other information (browser name/version, screenshots, etc.):