Page MenuHomePhabricator

[Code deprecation/removal] Remove Skin::appendSpecialPagesLinkIfAbsent
Closed, ResolvedPublicBUG REPORT

Description

Captures follow up work to T333211. This work should be done in the weeks leading up to the 1.44 release.

TODO

  • Run a new user notice (see T385346 for original) telling editors if they haven't followed instructions in T385346 they will lose the special page link.
  • Make sure user notice identifies all MediaWiki:Sidebar pages that exist without the special page link to clarify who is impacted.

Done in T388927: [For action] Avoid losing special page link in future MediaWiki version

Event Timeline

I wonder if we should make the 1.44 release with the migration function and remove it in the 1.45 release? I don't see any downsides, and a more gradual transition this way would probably soften the blow.

Jdlrobson renamed this task from [Code removal] Remove Skin::appendSpecialPagesLinkIfAbsent to [Code deprecation/removal] Remove Skin::appendSpecialPagesLinkIfAbsent.Feb 18 2025, 11:11 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.

Sorry that wasn't written very clearly. Does the revised edit make sense?

I understood what it meant, (though it is more clear now) I'm just not sure if we should backport the hard deprecation, which to my understanding means removal. Also not sure if that means this is a blocker for 1.44.

I understood what it meant, (though it is more clear now) I'm just not sure if we should backport the hard deprecation, which to my understanding means removal. Also not sure if that means this is a blocker for 1.44.

  • Hard deprecation means adding a call to wfDeprecated inside the function body so that it shows up in logs of 3rd parties. That would be too much traffic for production so we don't ever want to do that in production (example)
  • Removal means deleting the function with an update to RELEASE_NOTES

We could write those patches now, and I can make sure they go out when it's time to do that.

Change #1124223 had a related patch set uploaded (by Aaron liu; author: Aaron liu):

[mediawiki/core@master] Skins: Hard deprecate appendSpecialPagesLinksIfAbsent()

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

Change #1124223 had a related patch set uploaded (by Aaron liu; author: Aaron liu):

[mediawiki/core@master] Skins: Hard deprecate appendSpecialPagesLinksIfAbsent()

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

Change #1127983 had a related patch set uploaded (by Aaron liu; author: Aaron liu):

[mediawiki/core@master] Skins: Remove appendSpecialPagesLinksIfAbsent()

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

Change #1142670 had a related patch set uploaded (by Jdlrobson; author: Aaron liu):

[mediawiki/core@REL1_44] Skins: Hard deprecate appendSpecialPagesLinksIfAbsent()

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

Change #1124223 merged by jenkins-bot:

[mediawiki/core@master] Skins: Hard deprecate appendSpecialPagesLinksIfAbsent()

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

Change #1142670 merged by jenkins-bot:

[mediawiki/core@REL1_44] Skins: Hard deprecate appendSpecialPagesLinksIfAbsent()

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

Change #1127983 merged by jenkins-bot:

[mediawiki/core@master] Skins: Remove appendSpecialPagesLinksIfAbsent()

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

Jdlrobson-WMF claimed this task.

This is now done. Thanks for your patience :-)

Change #1166202 had a related patch set uploaded (by MacFan4000; author: Aaron liu):

[mediawiki/core@REL1_44] Skins: Remove appendSpecialPagesLinksIfAbsent()

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

Change #1166202 abandoned by MacFan4000:

[mediawiki/core@REL1_44] Skins: Remove appendSpecialPagesLinksIfAbsent()

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

Change #1167713 had a related patch set uploaded (by MacFan4000; author: MacFan4000):

[mediawiki/core@REL1_44] Remove usage of deprecated appendSpecialPagesLinksIfAbsent().

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

Change #1167713 abandoned by MacFan4000:

[mediawiki/core@REL1_44] Remove usage of deprecated appendSpecialPagesLinksIfAbsent().

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

Change #1170203 had a related patch set uploaded (by Aaron liu; author: Aaron liu):

[mediawiki/core@REL1_44] Changelog: Specify function that emits deprecation warning

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

We are seeing quite a few reports about this change in the support channels btw.

Latest being:
https://www.mediawiki.org/wiki/Project:Support_desk#Updating_to_1.44:_Skin_errors

TypeError: array_column(): Argument #1 ($array) must be of type array, string given

Backtrace:
from /includes/skins/Skin.php(1548)
#0 /includes/skins/Skin.php(1548): array_column()
#1 /includes/skins/Skin.php(1639): MediaWiki\Skin\Skin->appendSpecialPagesLinkIfAbsent()
if ( in_array( 'n-specialpages', array_column( $bar, 'id' ) ) ) {

It seems the logic in this function assumes that $bar is always an array and for this user that wasn't true ? I'm following up with the user to figure out which skin they are using. The other option is that it is something in their MediaWiki:Sidebar message perhaps ?

If I'm looking in the source history, it seems that not only was this function deprecated, but the function handling this specific behavior is actually new as well ?

See https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Deprecation_warning_for_Skin::appendSpecialPagesLinkIfAbsent() which I edited in yesterday, for the history of that function. The patch for review right before your comment names the function in the changelog entry that contains the same information.

That said, I don't know about the array issue. I agree that it seems skin-specific as $sidebar should not be a stirng.

Change #1170203 merged by jenkins-bot:

[mediawiki/core@REL1_44] docs: Mention deprecated Skin::appendSpecialPagesLinkIfAbsent in release notes

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