Last modified: 2012-11-25 16:19:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44432, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42432 - Extension:ReplaceText comment causes MWException in RC and page history
Extension:ReplaceText comment causes MWException in RC and page history
Status: RESOLVED DUPLICATE of bug 38566
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.20.x
All All
: Highest critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-25 15:45 UTC by paxed
Modified: 2012-11-25 16:19 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description paxed 2012-11-25 15:45:48 UTC
MW 1.20, Extension:ReplaceText v0.9.5, amazon EC2, linux

Tried replacing text with another, now RecentChanges and a page history cause MWException.


Backtrace:
[409d688c] /wiki/Special:RecentChanges   Exception from line 594 of /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Message.php: Invalid message parameter
#0 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Message.php(568): Message->extractParam(Array)
#1 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Message.php(424): Message->replaceParameters('($1)', 'before')
#2 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Message.php(507): Message->toString()
#3 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Linker.php(1499): Message->escaped()
#4 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/ChangesList.php(435): Linker::commentBlock('Text replace - ...', Object(Title))
#5 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/ChangesList.php(642): ChangesList->insertComment(Object(RecentChange))
#6 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/specials/SpecialRecentchanges.php(528): OldChangesList->recentChangesLine(Object(RecentChange), false, 2)
#7 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/specials/SpecialRecentchanges.php(179): SpecialRecentChanges->webOutput(Object(ResultWrapper), Object(FormOptions))
#8 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/SpecialPage.php(611): SpecialRecentChanges->execute(NULL)
#9 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
#10 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#11 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Wiki.php(536): MediaWiki->performRequest()
#12 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/includes/Wiki.php(446): MediaWiki->main()
#13 /opt/var/www/htdocs/nethackwiki.com/mediawiki-1.20.0/index.php(59): MediaWiki->run()
#14 {main}

For some reason, extractParam() function in include/Message.php gets an empty array as a $param. I did a quick'n'dirty hack to handle that case.


What I did:

1) Entered the following as "original text":
\[\[[sS]pellbook of (dig|magic missile|fireball|cone of cold|sleep|finger of death|light|detect monsters|healing|knock|force bolt|confuse monster|cure blindness|drain life|slow monster|wizard lock|create monster|detect food|cause fear|clairvoyance|cure sickness|charm monster|haste self|detect unseen|levitation|extra healing|restore ability|invisibility|detect treasure|remove curse|magic mapping|identify|turn undead|polymorph|teleport away|create familiar|cancellation|protection|jumping|stone to flesh|flame sphere|freeze sphere|blank paper)\|(dig|magic missile|fireball|cone of cold|sleep|finger of death|light|detect monsters|healing|knock|force bolt|confuse monster|cure blindness|drain life|slow monster|wizard lock|create monster|detect food|cause fear|clairvoyance|cure sickness|charm monster|haste self|detect unseen|levitation|extra healing|restore ability|invisibility|detect treasure|remove curse|magic mapping|identify|turn undead|polymorph|teleport away|create familiar|cancellation|protection|jumping|stone to flesh|flame sphere|freeze sphere|blank paper)\]\]

2) Entered the following as "replacement text":
{{spell of|$1}}

3) Ticked "use regular expressions"

4) Selected several namespaces (Main, NetHackWiki, File, Source, ...)

5) Clicked continue.

6) Ignored the warning that the replacement string already exists.

6) Of all the articles that matched, only selected the first one (http://nethackwiki.com/wiki/Aligned_priest)

7) "Replace"

Afterwards, RC and the history page for the Aligned_priest -article throw the MWException.
Disabling any and all extensions doesn't help.
Comment 1 Jesús Martínez Novo (Ciencia Al Poder) 2012-11-25 16:03:07 UTC
Confirmed the breakage.

Entering the following edit summary on a page and saving causes the exception on any 1.20 wikis:

Text replace - "\[\[[sS]pellbook of (dig|magic missile|fireball|cone of cold|sleep|finger of death|light|detect monsters|healing|knock|force bolt|confuse monster|cure blindness|drain life|slow monster|wizard lock|create monster|detect food|cause fear|clai

Raising priority importance to Higest/Critical since it breaks RecentChanges whenever a edit summary like this is inserted on a page
Comment 2 Alex Monk 2012-11-25 16:10:38 UTC
Dupe of bug 38566?
Comment 3 Alex Monk 2012-11-25 16:19:33 UTC
Seems like it.

*** This bug has been marked as a duplicate of bug 38566 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links