Topic on Skin talk:Chameleon

I'm struggling to setup the Bootstrap extension and Chameleon skin on Mediawiki 1.35

2
YousufSSyed (talkcontribs)

I'm running mediawiki on Windows with Xampp. I installing the Chameleon skin by putting the folder in the extensions folder and adding wfLoadSkin( 'Chameleon' ); to localSettings. I installed Bootstrap with the Windows instructions , and added wfLoadExtension( 'Bootstrap' ); to localSettings. Chameleon doesn't work whether or not I use a premade XML layout nor my custom one (which works on Mediawiki 1.34.2). I get this output when loading pages:


Fatal error: Uncaught Error: Call to protected method BaseTemplate::getSidebar() from context 'Skins\Chameleon\Components\NavMenu' in C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavMenu.php:51 Stack trace: #0 C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavbarHorizontal\NavMenu.php(49): Skins\Chameleon\Components\NavMenu->getHtml() #1 C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavbarHorizontal.php(204): Skins\Chameleon\Components\NavbarHorizontal\NavMenu->getHtml() #2 C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavbarHorizontal.php(187): Skins\Chameleon\Components\NavbarHorizontal->buildNavBarElementFromDomElement(Object(DOMElement)) #3 C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavbarHorizontal.php(155): Skins\Chameleon\Components\NavbarHorizontal->buildAndCollectNavBarElementFromDomElement(Object(DOMElement), Array) #4 C:\Users\Yousuf\Desktop\xampp\htd in C:\Users\Yousuf\Desktop\xampp\htdocs\mediawiki\skins\chameleon\src\Components\NavMenu.php on line 51


Bootstrap Installation method 2 doesn't work either, and for Installation method 1, entering in composer COMPOSER=composer.local.json composer require --no-update mediawiki/bootstrap:~4.0returns Command "=composer.local.json" is not defined (despite composer.local.json existing in my mediawiki directory if that helps). How can I get the Chameleon skin working on Mediawiki 1.35?

YousufSSyed (talkcontribs)

I fixed it, I think it there was a version mismatch between Bootstrap and Chameleon. What I did was in composer.json located in the mediawiki directory, change my required composer packages from

"mediawiki/chameleon-skin": "~2.0",

"mediawiki/bootstrap": "~4.0",

"mediawiki/scss": "^2.0"

to

"mediawiki/chameleon-skin": ">=3.0",

"mediawiki/bootstrap": ">=4.0",

"mediawiki/scss": ">=2.0"

then ran composer update.