Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Compatibility to wmf/1.43.0-wmf.1 #421

Closed
physikerwelt opened this issue Apr 16, 2024 · 11 comments · Fixed by #423
Closed

Bug: Compatibility to wmf/1.43.0-wmf.1 #421

physikerwelt opened this issue Apr 16, 2024 · 11 comments · Fixed by #423
Milestone

Comments

@physikerwelt
Copy link

We see the following error

MediaWiki internal error.

Original exception: [379c0b3b4f0d469c0efd0d48] /wiki/Model_for_Electric_Potential_for_Gate_Electrodes_in_a_Quantum_Bus TypeError: Skins\Chameleon\Chameleon::Skins\Chameleon\{closure}(): Argument #1 ($rl) must be of type ResourceLoader, MediaWiki\ResourceLoader\ResourceLoader given, called in /var/www/html/includes/HookContainer/HookContainer.php on line 159
Backtrace:
from /var/www/html/skins/chameleon/src/Chameleon.php(86)
#0 /var/www/html/includes/HookContainer/HookContainer.php(159): Skins\Chameleon\Chameleon::Skins\Chameleon\{closure}(MediaWiki\ResourceLoader\ResourceLoader)
#1 /var/www/html/includes/ResourceLoader/HookRunner.php(49): MediaWiki\HookContainer\HookContainer->run(string, array, array)
#2 /var/www/html/includes/ServiceWiring.php(1865): MediaWiki\ResourceLoader\HookRunner->onResourceLoaderRegisterModules(MediaWiki\ResourceLoader\ResourceLoader)
#3 /var/www/html/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer::{closure}(MediaWiki\MediaWikiServices)
#4 /var/www/html/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService(string)
#5 /var/www/html/includes/MediaWikiServices.php(355): Wikimedia\Services\ServiceContainer->getService(string)
#6 /var/www/html/includes/MediaWikiServices.php(1732): MediaWiki\MediaWikiServices->getService(string)
#7 /var/www/html/includes/Output/OutputPage.php(3635): MediaWiki\MediaWikiServices->getResourceLoader()
#8 /var/www/html/includes/Output/OutputPage.php(3400): MediaWiki\Output\OutputPage->getResourceLoader()
#9 /var/www/html/includes/Output/OutputPage.php(3443): MediaWiki\Output\OutputPage->getRlClientContext()
#10 /var/www/html/includes/Output/OutputPage.php(3544): MediaWiki\Output\OutputPage->getRlClient()
#11 /var/www/html/includes/skins/SkinTemplate.php(328): MediaWiki\Output\OutputPage->headElement(Skins\Chameleon\Chameleon)
#12 /var/www/html/skins/chameleon/src/Chameleon.php(111): SkinTemplate->prepareQuickTemplate()
#13 /var/www/html/includes/skins/SkinTemplate.php(145): Skins\Chameleon\Chameleon->prepareQuickTemplate()
#14 /var/www/html/includes/skins/SkinTemplate.php(176): SkinTemplate->generateHTML()
#15 /var/www/html/includes/Output/OutputPage.php(3005): SkinTemplate->outputPage()
#16 /var/www/html/includes/actions/ActionEntryPoint.php(162): MediaWiki\Output\OutputPage->output(boolean)
#17 /var/www/html/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()
#18 /var/www/html/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#19 {main}

on https://staging.mardi4nfdi.org/wiki/Model_for_Electric_Potential_for_Gate_Electrodes_in_a_Quantum_Bus after upgrading to the latest production release. I wonder if this skin is deployed on any wiki that follows the WMF release cycle, as the root cause for the problem might also be somewhere else.

@malberts
Copy link
Contributor

malberts commented Apr 16, 2024

It looks like the Chameleon code is likely not even compatible with the future REL1_42 yet: #422

@physikerwelt
Copy link
Author

@malberts, Normally, these updates are easy to fix once you find the correct phabricator ticket, which I did not manage to do in a few minutes.

@physikerwelt
Copy link
Author

For this particular problem, it's just this line

use ResourceLoader;
which has another namespace, but I think the full namespace needs to be added everywhere...

@physikerwelt
Copy link
Author

By the way... the phabricator ticket is https://phabricator.wikimedia.org/T166010

@physikerwelt
Copy link
Author

@JeroenDeDauw, what do you think?

@JeroenDeDauw
Copy link
Member

@JeroenDeDauw, what do you think?

#423

@malberts malberts added this to the 5.0.0 milestone Apr 25, 2024
@malberts malberts reopened this Apr 25, 2024
@malberts
Copy link
Contributor

#423 might not be enough to solve the 1.42 compatibility. There are also ResourceLoader namespace changes in the SCSS dependency, and possibly our Bootstrap extension too. I am looking at those.

@malberts
Copy link
Contributor

@physikerwelt Can you try with the latest Chameleon master branch (which is going to be the new major version 5.0.0).

I updated the Bootstrap and SCSS dependencies and CI now passes on MW 1.42 and MW master. However, I have not manually tested either of those unreleased MW versions.

@physikerwelt
Copy link
Author

Thank you. This is a great improvement. A quick update from our side:

We updated to the latest master today at 3am.
The good news is, even if the skin is loaded the portal does not crash with a fatal. However, I did not manage so far to activate the skin, as I can not access the skin selection preference page due to a js error

https://staging.mardi4nfdi.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1

does produce an invalid result:

[795e2e064f759adbd1fd0327] /w/load.php?lang=en&modules=startup&only=scripts&raw=1&safemode=1 Error: Class "ResourceLoaderSkinModule" not found

Backtrace:

from /var/www/html/includes/ResourceLoader/ResourceLoader.php(417)
#0 /var/www/html/includes/ResourceLoader/ResourceLoader.php(453): MediaWiki\ResourceLoader\ResourceLoader->getModule(string)
#1 /var/www/html/includes/ResourceLoader/StartUpModule.php(170): MediaWiki\ResourceLoader\ResourceLoader->preloadModuleInfo(array, MediaWiki\ResourceLoader\Context)
#2 /var/www/html/includes/ResourceLoader/StartUpModule.php(425): MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations(MediaWiki\ResourceLoader\Context)
#3 /var/www/html/includes/ResourceLoader/Module.php(839): MediaWiki\ResourceLoader\StartUpModule->getScript(MediaWiki\ResourceLoader\Context)
#4 /var/www/html/includes/ResourceLoader/Module.php(808): MediaWiki\ResourceLoader\Module->buildContent(MediaWiki\ResourceLoader\Context)
#5 /var/www/html/includes/ResourceLoader/Module.php(951): MediaWiki\ResourceLoader\Module->getModuleContent(MediaWiki\ResourceLoader\Context)
#6 /var/www/html/includes/ResourceLoader/ResourceLoader.php(686): MediaWiki\ResourceLoader\Module->getVersionHash(MediaWiki\ResourceLoader\Context)
#7 /var/www/html/includes/ResourceLoader/ResourceLoader.php(786): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion(MediaWiki\ResourceLoader\Context, array)
#8 /var/www/html/includes/ResourceLoader/ResourceLoaderEntryPoint.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond(MediaWiki\ResourceLoader\Context)
#9 /var/www/html/includes/MediaWikiEntryPoint.php(199): MediaWiki\ResourceLoader\ResourceLoaderEntryPoint->execute()
#10 /var/www/html/load.php(42): MediaWiki\MediaWikiEntryPoint->run()
#11 {main}

This might be unrealated... however, I just had 20 minutes for this task today and wanted to share the preminar good result with you anyhow.

@malberts
Copy link
Contributor

malberts commented Apr 29, 2024

Thanks @physikerwelt. That ResourceLoaderSkinModule error was indeed caused by Chameleon. I fixed it this morning and now it's loading correctly:
Screenshot_20240429_114615

Screenshot_20240429_114735

@physikerwelt
Copy link
Author

Thank you. Works perfect.

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants