Page MenuHomePhabricator

MassEditRegex extension / Fatal error: Call to undefined method SkinVector::commentBlock()
Closed, ResolvedPublic

Description

Setup

  • MediaWiki 1.28.0 (e92ed15) 22:16, 28. Nov. 2016
  • PHP 5.6.27-0+deb8u1 (apache2handler)
  • MariaDB 10.0.28-MariaDB-1~jessie
  • MassEditRegex 8.1.1 (f6c7ea5) 15:56, 29. Okt. 2016

Issue
When trying to access special page "MassEditRegex" the extension errors out with:

Fatal error: Call to undefined method SkinVector::commentBlock() in /.../w/extensions/MassEditRegex/MassEditRegex.special.php on line 363

or

Fatal error: Call to undefined method SkinMonoBook::commentBlock() in /.../w/extensions/MassEditRegex/MassEditRegex.special.php on line 363

depending on which skin one is using.

This is an error starting with MW 1.28.0, the MW 1.27 branch is not affected. Originally reported on MediaWiki.org.

Event Timeline

I belive that it is calling a deprecated function if I am right that it is using Linker, it was moved into a different class, but it has two functions now, one is a static and one is just a function that is deprecated.

I belive that it is calling a deprecated function if I am right that it is using Linker, it was moved into a different class, but it has two functions now, one is a static and one is just a function that is deprecated.

Thanks for your insight on this. I am willing to test in case you would like to give it a shot at fixing.

I think I know how to fix this. I found the function was deperecated in skins.php, but I doint know why it is calling SkinVector::.

Change 325780 had a related patch set (by Paladox) published:
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

@Kghbln hi would you be able to test the above please? I doint know if it will have any other side effects or if that is the right code to be replaced with.

I think I know how to fix this. I found the function was deperecated in skins.php, but I doint know why it is calling SkinVector::.

For large edit tasks this extension also allows to execute the script in the browser itself which is useful if you want to avoid timeouts from direct script execution via the special page. I suppose that's the reason why there is some interaction with Vector and MonoBook which is probably also broken.

Change 325799 had a related patch set uploaded (by Kghbln):
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

This comment was removed by Paladox.

Change 325801 had a related patch set uploaded (by Kghbln):
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

Kghbln triaged this task as High priority.
Kghbln updated the task description. (Show Details)

Change 325780 merged by jenkins-bot:
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

Though the backports to REL1_27 and REL1_28 have not yet been merged this task can already be closed since we at least have version 8.2.0! Great work and tanks to @Paladox

@Kghbln Any insight as to when REL1_28 backport might get merged?

We automatically pull it and the extension basically doesn't work as is. The task 'extension branch rel1_28 is not compatible with mw 1.28' isn't just reporting the issue that caused it to be incompatible. Until the backport is actually merged and people can pull branch x and have it work with branch x of mediawiki, im going to say that the repeatedly merged issue is still valid. Extension branch 1.28 should work with mediawiki 1.28.

Any insight as to when REL1_28 backport might get merged?

By experience this can take every time between one hour and one month. However version 8.2.0 is authored and tagged so you can pull this on since it contains the necessary fix for MW 1.28+

Change 325799 merged by jenkins-bot:
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

Change 325801 merged by jenkins-bot:
Replace deprecated skin's commentBlock function with Linker::commentBlock

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

Speak of the devil :p
Thanks guys

Speak of the devil :p
Thanks guys

So three weeks is within the timeframe I guess. ;) I believe you triggered something. :)

@Reedy Thanks a lot!

Speak of the devil :p
Thanks guys

So three weeks is within the timeframe I guess. ;) I believe you triggered something. :)

@Reedy Thanks a lot!

FYI @Kghbln it's generally considered ok to CR+2 patches (whether it's your own patch, or someone else's cherry picked by you) when they're cherry picks to release branches to fix bugs