ProfessionalWiki / chameleon

Provides a highly flexible and customizable skin using Bootstrap 4
https://www.mediawiki.org/wiki/Skin:Chameleon
Other
116 stars 62 forks source link

Deprecated error/exception: User::getRights #304

Closed fol9000 closed 2 years ago

fol9000 commented 2 years ago

Hi, I'm getting a deprecated error/exception when using chameleon:

Deprecated: Use of User::getRights was deprecated in MediaWiki 1.34. [Called from call_user_func in (internal function)] in /mywiki-1.37.1/includes/debug/MWDebug.php on line 375

Seems that this error occurs in PermissionHelper.php line 90.

I'm using PHP 7.4.21 and Mediawiki 1.37.1 and I'm currently using ini_set('display_errors', 'Off') as a workaround.

Is this a configuration problem or a chameleon bug (or sth else)?

malberts commented 2 years ago

You need to use the latest master code (soon to be released version 4.0.0) where it is already fixed.

The last stable release (3.4.1) will cause that deprecation notice.

JeroenDeDauw commented 2 years ago

Guess we should get to doing that 4.0 release. Anything blocking it?

malberts commented 2 years ago

I'm just wrapping up #302. Besides that I'm not going to mess with anything else for 4.0 (I thought it might be a good time to change the default layout, but I'm rather not going to touch that now).

fol9000 commented 2 years ago

There is also this message in the browser console:

This page is using the deprecated ResourceLoader module "skins.chameleon". [1.37] The use of the content feature with ResourceLoaderSkinModule is deprecated. Use content-media instead. [1.37] The use of the legacy feature with ResourceLoaderSkinModule is deprecated(T89981). More information can be found at [[mw:Manual:ResourceLoaderSkinModule]].

Again: Is this a configuration problem or a chameleon bug (or sth else)?

malberts commented 2 years ago

That is a Chameleon + MW 1.37 issue. So far it looks like it might not be straightforward to get rid of the deprecation warning simply by changing skin.json. The suggested resource loader features don't exist in MW 1.35. The resource loader might have to go back into a hook again. If that also isn't a simple change then we're just going to have to live with the deprecation notice for 4.0.0 and then this can be addressed in a future point release.