Extension talk:Replace Text/Archive 2018

Feature request
Heiya, I would be cool if one would be able to add an additional reason for the replacement action taken to be shown in the log than just "Text replace - ...". Being able to localise "Text replace" would be another small wish. Cheers --&#91;&#91;kgh&#93;&#93; 21:48, 15 February 2012 (UTC)

Pipe and Regex fails
Just a note, might be a bug: Using a pipe symbol | in the search field in conjunction with regular expressions leads to following error message: Es ist ein Datenbankfehler aufgetreten. Der Grund kann ein Programmierfehler sein. Die letzte Datenbankabfrage lautete: (SQL-Abfrage versteckt) aus der Funktion „ReplaceText::doSearchQuery“. Die Datenbank meldete den Fehler „1139: Got error 'empty (sub)expression' from regexp (localhost)“.

Since I have a lot of SMW queries using the pipe, I came accross this. Anyway, I can of course search for patterns leaving out the |

--Francishunger (talk) 23:54, 22 March 2012 (UTC)


 * I suppose that's because the pipe isn't part of the MySQL regex syntax, see http://dev.mysql.com/doc/refman/5.1/en/regexp.html for details. EDIT: Should have read through that page ... the pipe symbol should be recognized. --Nakohdo (talk) 07:25, 23 March 2012 (UTC)

Regex to batch move pages to new namespace fails [OPEN]
I'd like to batch move pages in category 'Person' from MAIN namespace to custom namespace 'PERSON'.

My setup
 * MW: 1.16.x
 * MySQL: 5.1.41-3ubuntu12.10
 * Replace Text: 0.9.3

My Replace Text settings:
 * Original text:
 * Replacement text:
 * [x] Use regular expressions
 * Search in namespaces: [x] (Main)
 * Replace only in category:
 * [x] Replace text in page titles, when possible

As a result I get messed page titles, e.g. a page Alex will be renamed to Person:APerson:Person:lPerson:Person:ePerson:Person:xPerson:

When changing the original text to  and the replacement text to   everything works as expected, moving all pages starting with letter A to the new namespace. Is this a bug or did I miss something?

--Planetenxin (talk) 07:42, 7 May 2012 (UTC)


 * I'm not sure you can move namespaces like this as namespaces are treated differently than normal page titles. See http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces for further pointers. hth --Nakohdo (talk) 14:16, 7 May 2012 (UTC)

Can't even replace one single word after 7 hours
I read that the extension can't replace all words immediately. So I decided to wait and go to bed. But when I checked 7 hours later, not a single word has been replaced.

What would be the problem? My website hasn't yet been known to anyone except me and very few people who I personally know, so the traffic is very small. Is this the source of the problem?

If this problem can't be solved, how can I stop and cancel this wiki job?


 * You can manually perform all jobs waiting in the jobs queue by running RunJobs.php (link for directions) --FreedomFighterSparrow (talk) 13:50, 12 June 2012 (UTC)


 * Running a cron job regulary for . --Subfader (talk) 10:28, 16 June 2012 (UTC)

A way to undo?
Is there a way to undo changes? Or do a mass revert?

If not, can this be a request :D


 * Unfortunately, there's no way to do that. Maybe this should be filed under the need for a tool to do mass reverts of all the edits (or all the latest edits) by one user - there's no way to do that in general, and that would be useful in dealing with spam as well. Yaron Koren (talk) 01:43, 17 July 2012 (UTC)


 * I should note, though, that this script might be helpful until there's a true solution. Yaron Koren (talk) 12:54, 17 July 2012 (UTC)

Won't Work
I cannot get this to work. It keeps saying ''No pages were found containing the string "(whatever I searched for)". '' I know that the string I am searching for is on at least one page. --Zackmann08 (talk) 16:52, 27 July 2012 (UTC)


 * Hi - does it literally say that for any search string you type in? And by any chance, are you putting quotes in the search string? You shouldn't do that. Yaron Koren (talk) 16:58, 27 July 2012 (UTC)
 * If I search for the word hello (so no quotes), it says No pages were found containing the string "hello". --Zackmann08 (talk) 20:37, 27 July 2012 (UTC)


 * I assume that you have at least one page containing "hello"? Note also that the search is case-sensitive. What about just searching for a single letter? Yaron Koren (talk) 20:45, 27 July 2012 (UTC)


 * When I search for a single letter it works. --Zackmann08 (talk) 23:00, 28 July 2012 (UTC)

Append Text
Since this expansion already allows to select pages in very nice ways, I would love to mis-use it to append some text to the page instead of replace it.

You could just rule if "Original text" is empty, the "Replacement text" will be appended to all pages.--VolkoV (talk) 10:17, 6 August 2012 (UTC)


 * You could also use a hook to display text below eahc articles. --Subfader (talk) 11:20, 6 August 2012 (UTC)


 * I know, but if I want to change a lot of existing articles, this won't help.--VolkoV (talk) 11:27, 6 August 2012 (UTC)

Regular Expressions
I'm not seeing any "Use regular expressions" on the ReplaceText page. Is there some file that needs to be configured for this option to appear? Or is it just an outdated version of the extension... Hylian King ZW (talk) 13:48, 17 August 2012 (UTC)


 * I assume it's the latter. Looking at the version history, it looks like that feature was added in version 0.9. Yaron Koren (talk) 14:05, 17 August 2012 (UTC)


 * Alright, thanks for humoring a new sysop who is still fairly clueless about the inner workings of MediaWiki. Hylian King ZW (talk) 14:40, 17 August 2012 (UTC)

Edits only by a Special Bot
How can i make it, that the Edits of this extensions was make vom from a Bot and not from the User who gives the Task to Start? 178.2.136.195 06:48, 8 November 2012 (UTC)


 * Unfortunately, it's not possible to have a bot do it, because Replace Text doesn't offer an API action. But I think you can make it appear that a bot did it, by logging in as that bot and doing the replacement. Yaron Koren (talk) 13:40, 8 November 2012 (UTC)


 * I hardcoded that into the extsnion cos I also think it's more useful this way. Maybe think of implenting a variable setting for it like $wgReplaceTextUser. --Subfader (talk) 14:46, 16 November 2012 (UTC)

Error on runJobs when $wgCacheDirectory is set
I run  regulary but when I set $wgCacheDirectory I get the error Unable to open DB file for write "/tmp/cacheMsg/l10n_cache-en.cdb" Backtrace:
 * 1) 0 includes/Cdb.php(62): CdbWriter_DBA->__construct('/tmp/cacheMsg/l...')
 * 2) 1 includes/LocalisationCache.php(883): CdbWriter::open('/tmp/cacheMsg/l...')
 * 3) 2 includes/LocalisationCache.php(613): LCStore_CDB->startWrite('en')
 * 4) 3 includes/LocalisationCache.php(352): LocalisationCache->recache('en')
 * 5) 4 includes/LocalisationCache.php(262): LocalisationCache->initLanguage('en')
 * 6) 5 includes/LocalisationCache.php(205): LocalisationCache->loadItem('en', 'magicWords')
 * 7) 6 languages/Language.php(1946): LocalisationCache->getItem('en', 'magicWords')
 * 8) 7 languages/Language.php(1960): Language->getMagicWords
 * 9) 8 [internal function]: Language->getMagic(Object(MagicWord))
 * 10) 9 includes/StubObject.php(58): call_user_func_array(Array, Array)
 * 11) 10 includes/StubObject.php(121): StubObject->_call('getMagic', Array)
 * 12) 11 [internal function]: StubContLang->__call('getMagic', Array)
 * 13) 12 includes/MagicWord.php(259): StubContLang->getMagic(Object(MagicWord))
 * 14) 13 includes/MagicWord.php(197): MagicWord->load('rmatch')
 * 15) 14 includes/parser/Parser.php(4289): MagicWord::get('rmatch')
 * 16) 15 extensions/RegexFunctions/RegexFunctions.php(49): Parser->setFunctionHook('rmatch', Array)
 * 17) 16 [internal function]: wfRegexFunctions
 * 18) 17 includes/Setup.php(370): call_user_func('wfRegexFunction...')
 * 19) 18 maintenance/doMaintenance.php(86): require_once('/var/www/vhosts...')
 * 20) 19 maintenance/runJobs.php(103): require_once('/var/www/vhosts...')
 * 21) 20 {main}

Can this be fixed? MW 1.16a and ReplaceText 0.9.1 here but that shouldn't matter. Cheers. --Subfader (talk) 13:34, 24 November 2012 (UTC)


 * I have no idea. Does this happen only for Replace Text jobs, do you know? Yaron Koren (talk) 16:03, 25 November 2012 (UTC)


 * You're right, not only for RT. Wrong place here. https://bugzilla.wikimedia.org/show_bug.cgi?id=42437 --Subfader (talk) 20:59, 25 November 2012 (UTC)

XML Error
I get the following error when accessing the special page

Fatal error: Call to undefined method Xml::hidden in C:\xampp\htdocs\wiki\extensions\ReplaceText\SpecialReplaceText.php on line 228

Luke 28 November 2012