ProfessionalWiki / chameleon

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

Bootstrap install not detected #351

Open despens opened 2 years ago

despens commented 2 years ago

Setup:

Product Version
MediaWiki 1.37.6
PHP 8.0.23 (apache2handler)
MariaDB 10.3.36-MariaDB-1:10.3.36+maria~ubu2004
ICU 67.1
Lua 5.1.5
Pygments 2.10.0
Extension Version License Description Authors
Bootstrap 4.6.0 GPL-3.0-or-later Provides the Bootstrap framework in the wiki Stephan Gambke, Professional.Wiki and James Hong Kong

Installed via composer:

mediawiki/bootstrap:~4.0 mediawiki/chameleon-skin:~4.0

PHP error:

Fatal error: Uncaught ExtensionDependencyError: chameleon requires Bootstrap to be installed. in /var/www/html/includes/registration/ExtensionRegistry.php:432 Stack trace: #0 /var/www/html/includes/registration/ExtensionRegistry.php(255): ExtensionRegistry->readFromQueue(Array) #1 /var/www/html/includes/Setup.php(168): ExtensionRegistry->loadFromQueue() #2 /var/www/html/includes/WebStart.php(90): require_once('/var/www/html/i...') #3 /var/www/html/index.php(44): require('/var/www/html/i...') #4 {main} thrown in /var/www/html/includes/registration/ExtensionRegistry.php on line 432

JeroenDeDauw commented 2 years ago

You need to load the Bootstrap extension. wfLoadExtension

despens commented 1 year ago

Bootstrap is installed and loaded via wfLoadExtension( 'Bootstrap' );. When removing the Chameleon skin, it shows up as expected on Special:Version, as copy-pasted above.

When the chameleon skin is installed, regardless if activated via wfLoadSkin( 'chameleon' ); or not, the error message above appears. Only when not installing the Chameleon skin at all the error message doesn't appear.

malberts commented 1 year ago

What commands did you use to install Bootstrap and Chameleon? Or did you add it directly to composer.local.json?

despens commented 1 year ago

I used the commands provided in the instructions:

Bootstrap

COMPOSER=composer.local.json composer require --no-update mediawiki/bootstrap:~4.0
composer update mediawiki/bootstrap --no-dev -o

Chameleon

COMPOSER=composer.local.json composer require --no-update mediawiki/chameleon-skin:~4.0
composer update mediawiki/chameleon-skin --no-dev -o
Seb35 commented 1 year ago

It may be because wfLoadSkin( 'chameleon' ); is before wfLoadExtension( 'Bootstrap' );, try to flip them: Bootstrap before chameleon (I vaguely remember this "issue" although I did not recheck recently).