Page MenuHomePhabricator

"MassEditRegex" extension / Undefined variables and Call to undefined method
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.27.0-rc.1 (5462877)
  • PHP 5.6.22-0+deb8u1 (apache2handler)
  • MariaDB 10.0.26-MariaDB-1~jessie
  • MassEditRegex 8.1.0 (fa9f7d2)

Issues
This happens if I add an regex search for an non existing category, i.e. I tell the extension to work on category "xyz" and no category "xyz" exists.

2016-06-28 12:16:35 phalaris 0210020150926-02100_: [d8ebc15b03c698809a5c6cd6] /w/index.php?title=Sp%C3%A9cial:MassEditRegex&action=submit   ErrorException from line 182 of /.../w/extensions/MassEditRegex/MassEditRegex.special.php: PHP Notice: Undefined variable: htmlDiff
#0 /.../w/extensions/MassEditRegex/MassEditRegex.special.php(182): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /.../w/extensions/MassEditRegex/MassEditRegex.special.php(244): MassEditRegexSpecialPage->perform(boolean)
#2 /.../w/includes/specialpage/SpecialPage.php(479): MassEditRegexSpecialPage->execute(NULL)
#3 /.../w/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
#4 /.../w/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Title, RequestContext)
#5 /.../w/includes/MediaWiki.php(745): MediaWiki->performRequest()
#6 /.../w/includes/MediaWiki.php(519): MediaWiki->main()
#7 /.../w/index.php(43): MediaWiki->run()
#8 {main}

Not sure how I got this on a 8.0.3. Forgot to note down the situation, so nothing to worry about at the moment I guess.

Fatal error: Call to undefined method DifferenceEngine::setText() in /.../w/extensions/MassEditRegex/MassEditRegex.class.php on line 83

Event Timeline

@Malvineous FYI. There was another report of an issue which is was not able to replicate.

Edit: It turns out that there was another issue causing this. So no worries here. --Kghbln 2016-06-30, 07:57 UTC

Hi did this work in any previous mediawiki versions? Since If it did it would be helpful since we could track down where the problem first started please?

Change 309843 had a related patch set uploaded (by Paladox):
Fix undefined $htmlDiff

https://gerrit.wikimedia.org/r/309843

@Kghbln Hi, could you test the above patch to see if it fixes the problem please?

Change 309843 merged by jenkins-bot:
Fix undefined $htmlDiff

https://gerrit.wikimedia.org/r/309843

@Paladox I am sorry but this totally slipped my mind. I have just tested master and it works fine, i.e. I no longer get the issue reported. Thanks a lot for fixing.

Change 316316 had a related patch set uploaded (by Kghbln):
Release version 8.1.1 to get improvments to the public

https://gerrit.wikimedia.org/r/316316

Kghbln triaged this task as Medium priority.

This task may be closed after https://gerrit.wikimedia.org/r/316316 was merged and tagged. Thanks a lot!

Your welcome and thanks for testing.

Change 316326 had a related patch set uploaded (by Paladox):
Fix undefined $htmlDiff

https://gerrit.wikimedia.org/r/316326

Change 316316 merged by jenkins-bot:
Release version 8.1.1 to get improvments to the public

https://gerrit.wikimedia.org/r/316316

Change 316326 merged by jenkins-bot:
Fix undefined $htmlDiff

https://gerrit.wikimedia.org/r/316326