Extension:ReplaceText giving db errors on Zelda wiki
Link Lab is trying to do case-insensitive text replaces using the method detailed on https://www.mediawiki.org/wiki/Extension:Replace_Text#Case-insensitive_search but everytime he's met with an error like `[d383c3c45dd5780cfe7a35ee] 2018-11-16 19:45:08: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"` wants to know if it would be possible for the following parameters to be enabled for bug-reporting? ```$wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; $wgShowSQLErrors = true;``` Tried also in Staging (what follows is copied from Slack #zelda channel) Link Lab [Today at 3:19 PM] ```[84ab0bb7a46b15f9b31825eb] /Special:ReplaceText Wikimedia\Rdbms\DBQueryError from line 1458 of /home/hydra/public_html/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: SELECT page_id,page_namespace,page_title,old_text FROM `page`,`revision`,`text` WHERE (old_text REGEXP '(?i)lttp') AND page_namespace IN ('6','7') AND (rev_id = page_latest) AND (rev_text_id = old_id) ORDER BY page_namespace, page_title LIMIT 250 Function: ReplaceTextSearch::doSearchQuery Error: 1139 Got error 'repetition-operator operand invalid' from regexp (db1-slave.aurora.local.curse.us:3306) Backtrace: #0 /home/hydra/public_html/includes/libs/rdbms/database/Database.php(1428): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 /home/hydra/public_html/includes/libs/rdbms/database/Database.php(1201): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 /home/hydra/public_html/includes/libs/rdbms/database/Database.php(1654): Wikimedia\Rdbms\Database->query(string, string) #3 /home/hydra/public_html/extensions/ReplaceText/src/ReplaceTextSearch.php(62): Wikimedia\Rdbms\Database->select(array, array, array, string, array) #4 /home/hydra/public_html/extensions/ReplaceText/src/SpecialReplaceText.php(289): ReplaceTextSearch::doSearchQuery(string, array, string, string, boolean) #5 /home/hydra/public_html/extensions/ReplaceText/src/SpecialReplaceText.php(163): SpecialReplaceText->getTitlesForEditingWithContext() #6 /home/hydra/public_html/extensions/ReplaceText/src/SpecialReplaceText.php(71): SpecialReplaceText->doSpecialReplaceText() #7 /home/hydra/public_html/includes/specialpage/SpecialPage.php(522): SpecialReplaceText->execute(NULL) #8 /home/hydra/public_html/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL) #9 /home/hydra/public_html/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext) #10 /home/hydra/public_html/includes/MediaWiki.php(861): MediaWiki->performRequest() #11 /home/hydra/public_html/includes/MediaWiki.php(524): MediaWiki->main() #12 /home/hydra/public_html/index.php(42): MediaWiki->run() #13 {main}``` This was the error produced on the staging environment. 3 replies Link Lab [12 minutes ago] My replace was to replace `(?i)lttp` with `LttP` with Regular Expressions enabled in the `File` and `File talk` namespaces. Link Lab [11 minutes ago] Trying without `(?i)` on both the wiki and staging environment produced the same results. Link Lab [9 minutes ago] If I then expand the search to all namespaces, the staging environment returns a 504 error while the wiki handles the request just fine.
issue