Page MenuHomePhabricator

Error: Class "MediaWiki\SpecialPage\SpecialPage" not found
Closed, ResolvedPublic

Description

Setup

Issue

2025-05-28 13:31:38 hostname 8715520190814-87155_: [6dabd84882d7b2da49d07429] /p/Specjalna:PluggableAuthLogin?code=..._ Error: Class "MediaWiki\SpecialPage\SpecialPage" not found

Stacktrace

#0 /../w/includes/specialpage/SpecialPage.php(701): MediaWiki\Extension\PluggableAuth\PluggableAuthLogin->execute()
#1 /../w/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()
#2 /../w/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#3 /../w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#4 /../w/includes/MediaWiki.php(562): MediaWiki->main()
#5 /../w/index.php(50): MediaWiki->run()
#6 /../w/index.php(46): wfIndexMain()
#7 {main}

It looks like this issue was introduced with version 7.3.0 as part of fixing T373409, at least this is when the class got added.

Event Timeline

@MarkAHershberger @cicalese, could you have a look at this? For now, I rolled back to version 7.1.0 for both extensions, waiting on feedback on whether SSO integration works. Perhaps version 7.3.0 of PluggableAuth was breaking for 1.39, though it does not look like it, judging from the backporting activity.

Kghbln updated the task description. (Show Details)
Kghbln updated the task description. (Show Details)

In other words, the change was breaking for MW 1.40.x and earlier?!

In other words, the change was breaking for MW 1.40.x and earlier?!

rEPLG079a34a050f5: Use new class names for various core classes bumped the requirement to 1.40.0..

rEPLGfd63faae6046: Add optional support for backchannel logout seems to be the commit in master, which is also in REL1_44 branching...

https://www.mediawiki.org/wiki/Extension:PluggableAuth says (though clearly isn't completely true based on master extension.json suggesting 1.40.0)

Snapshots releases along with MediaWiki. Master is not backward compatible.

So you shouldn't be using the master version with REL1_39 as is seemingly happening..

So you shouldn't be using the master version with REL1_39 as is seemingly happening..

I am not. I was using tag 7.4.0, which, according to extension.json, should work with MW 1.35.0 and later. https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/blob/7.4.0/extension.json

Tag 7.5.0 and master are master are 1.40.0 and later.

Anyhow, this is just a matter a wrong version compat in extension.json

Kghbln closed this task as Resolved.EditedMay 28 2025, 5:15 PM
Kghbln claimed this task.

Sort of "fixed". No big deal, just a matter of documenting since we cannot change the code for already tagged versions and already have a tag beyond without the issue.

The basic issue is extension version management, especially with respect to patches that bump the MediaWiki requirement. In my opinion, those should at minimum do a minor version bump to the extension version. In this case, the patch to change the MediaWiki requirement to MW 1.40 should have bumped the extension version to 7.5.0. However, such patches are often submitted and merged by developers other than the extension maintainer, and there are no universal rules for extension versioning to guide them. I've started to comment on those patches with that guidance when I see them, but I clearly missed noting that this patch bumped the MediaWiki requirement (even though I clearly saw the patch and back ported it to 1.43). I do think that establishing some norms for extension versioning would be helpful.

I fixed the location of the comment in the version history to 7.4.0 from 7.3.0, since that is where the change happened.

I do think that establishing some norms for extension versioning would be helpful.

This still does not prevent errors or slips from happening, as we experience here. We are all humans. ;)

I fixed the location of the comment in the version history to 7.4.0 from 7.3.0, since that is where the change happened.

Hmm, I thought this commit as part of 7.3.0 introduced the problem?

I fixed the location of the comment in the version history to 7.4.0 from 7.3.0, since that is where the change happened.

Hmm, I thought this commit as part of 7.3.0 introduced the problem?

You are correct, the problematic line of code was introduced in 7.3.0. There were more similar changes made as well as explicitly bumping the MediaWiki version in 7.4.0 in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PluggableAuth/+/1126711/2/extension.json. I will change the documentation back to state the version requirement changed in 7.3.0.

I do think that establishing some norms for extension versioning would be helpful.

This still does not prevent errors or slips from happening, as we experience here. We are all humans. ;)

Yes, undoubtedly that is correct. In fact, two errors happened here: not bumping the MediaWIki version when the switch to the namespaced class was made, and not bumping the extension version when the MediaWiki version was bumped. I feel that having some guidance for extension developers would help, at a minimum to make apparent the downstream consequences of not following such rules.