Last modified: 2013-02-06 21:45:31 UTC
ReplaceText can be enhanced to accept an optional limit for the number of pages to return from the search, which would provide a way to resolve bug 38170 without needing to alter the server's PHP configuration. For example, today I tried running ReplaceText on 70000 pages, and it's only a matter of time before I'll try running it on millions of pages. With a large enough replace operation, the incorrect namespace error is less of a problem than the page size and load time at the "are you sure?" verification stage of ReplaceText. That can render ReplaceText practically unusable even when using the server configuration workaround suggested in bug 38170. The workaround I'm currently using is to enter all the possible page prefixes to ensure a predictable fraction of pages will be found and replaced. That works for 70,000 pages. It probably won't work anymore for millions of pages, simply because the fraction of pages will still be too large to produce a reasonably verification page size and load time. This problem could also be helped with a "skip verification page" option, but given the power of ReplaceText, skipping the verification page is probably foolish.
This turns out to be more important than just an enhancement, due to security issues and the potential for data to be lost, as described here: https://bugzilla.wikimedia.org/show_bug.cgi?id=38170#c10 So, I'm elevating it to "critical" severity.
For anyone who finds these bug reports, I produced some more detailed documentation that describes the security issues and other known problems, and also provides descriptions of workarounds. It should be easier to read for people who aren't involved enough in MediaWiki extension development to feel comfortable divining solutions from bug reports. https://www.mediawiki.org/wiki/User:Badon#Extension:ReplaceText_known_issues