Skin talk:Chameleon

Jump to navigation Jump to search

About this board

mediawiki 1.35 blank page enabling it

Sancelot (talkcontribs)

I have this messagen cirrussearch is enabled in my setup I don't know if it is related

[Fri Oct 16 14:08:45.083135 2020] [php7:error] [pid 7084] [client ::1:33532] PHP Fatal error:  Uncaught Error: Call to protected method BaseTemplate::makeSearchInput() from context 'Skins\\Chameleon\\Components\\SearchBar' in /var/www/w/skins/chameleon/src/Components/SearchBar.php:73\nStack trace:\n#0 /var/www/w/skins/chameleon/src/Components/Structure.php(53): Skins\\Chameleon\\Components\\SearchBar->getHtml()\n#1 /var/www/w/skins/chameleon/src/Components/Container.php(54): Skins\\Chameleon\\Components\\Structure->getHtml()\n#2 /var/www/w/skins/chameleon/src/Components/Structure.php(53): Skins\\Chameleon\\Components\\Container->getHtml()\n#3 /var/www/w/skins/chameleon/src/Components/Container.php(54): Skins\\Chameleon\\Components\\Structure->getHtml()\n#4 /var/www/w/skins/chameleon/src/Components/Structure.php(53): Skins\\Chameleon\\Components\\Container->getHtml()\n#5 /var/www/w/skins/chameleon/src/Components/Container.php(54): Skins\\Chameleon\\Components\\Structure->getHtml()\n#6 /var/www/w/skins/chameleon/src/Components/Structure.php(53): Skins\\Chameleon\\Components\\Container->getHtml()\n#7 /var/www/w/skins/chameleon/src/Compon in /var/www/w/skins/chameleon/src/Components/SearchBar.php on line 73, referer: http://localhost/index.php/Sp%C3%A9cial:Pr%C3%A9f%C3%A9rences

Reply to "mediawiki 1.35 blank page enabling it"

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

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"


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

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

"mediawiki/scss": ">=2.0"

then ran composer update.

Navbar visibility for logged-out users when anonymous editing is disabled

Ghoulshine (talkcontribs)

I've recently just disabled anonymous editing after not realizing I had it on to begin with, and noticed that it hides the header/navbar and footer when this is set and people are logged out (meaning there's also no link to a login page). Is there some way around this? I'd like for the header and footer to show for people who are logged out. I'm using 3.1.0.

ETA: Never mind, I'm stupid. I just have to modify a line towards the beginning of the layout I'm using (in this case, clean.xml).

Much obliged.

Summary by AdamPloof

Solution presented below was successful in resolving the issue.

AdamPloof (talkcontribs)

I recently installed the chameleon skin on a local environment and ran into a confusing error that I'm having trouble solving. The symptom is that the bootstrap/chameleon style sheet is not loading properly and I'm getting an almost completely un-styled page when enabling the chameleon skin. I had previously installed the Bootstrap extension which was working fine before installing the chameleon skin, but now that is no longer working.

After loading my wiki with debug=true and examining the responses for each style sheet I found the request for load.php?modules=ext.bootstrap.styles... is returning an error in the response which is:

/* SCSS compile error: @return may only be used within a function: C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/_functions.scss on line 22, at column 4

Call Stack:

#0 function abs C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/_mixins.scss on line 56

#1 mixin bullet C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/_basics.scss on line 22

#2 import C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/_basics.scss C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/chameleon.scss on line 15

#3 import C:\xampp\htdocs\mediawiki/skins/chameleon/resources/styles/chameleon.scss (unknown file) on line 1*/

This error is the only content of the response, there is no other CSS returned.

Looking at _functions.scss I couldn't see anything wrong -- the @return statement is indeed inside a @function as it should be. It looks like the the .scss is not compiling properly, but I haven't been able to figure out why. I'm not sure what the unknown file in .../chameleon.scss (unknown file) on line 1*/ is referring to either, but perhaps that's also a clue. Any help appreciated.

For reference: I'm running MediaWiki version 1.34.2, Chameleon skin 3.0.1, and Bootstrap 4.2.1. All are listed as installed on the Special:Version page.

John Bradie (talkcontribs)

Looks like it might be the same error as in the "1.35.0-rc.2" below, tracked with issue 187 on GitHub.

Try this from your installation directory (e.g. C:\xampp\htdocs\mediawiki)?

$ composer require scssphp/scssphp:1.1.1 --update-no-dev

Summary by Kghbln

Tracked with issue 187 on GitHub. (talkcontribs)

I upgraded to Mediawiki 1.35.0-rc.2 and the skin doesn't seem to work.

To double check, I did again a fresh install and only added Chameleon and Bootstrap, and still didn't work. So I think there has been a breaking change in Mediawiki 1.35.

Has anybody else experienced this?

Kghbln (talkcontribs)

Indeed it looks like the XML layout file is no longer loaded. Assuming that this is what you see, too. So, no Chameleon is not compatible with MW 1.35.x yet.

How to get VE edit bar to show on top of fixed nav bar when scrolling down

Revansx (talkcontribs)
  • MW 1.34
  • Chameleon 3.0.1
  • VisualEditor 0.1.1 (74116a7) 18:02, 23 December 2019

I'm using the fixedhead layout and when i edit a long page the VE edit toolbar scrolls under the fixed position nav bar. What changes to the SCSS Variables are required to fix this? Thank you!

Reply to "How to get VE edit bar to show on top of fixed nav bar when scrolling down"

Why does "User:username/chameleon.css" work but "MediaWiki:Chameleon.css" does not?

Summary by Revansx

I have been able to make the desired changes using the $egChameleonExternalStyleVariables variable per the docs, however it is still a mystery to my why the user css pages works and not a global css page. I would think it would be both or none. If anyone can satisfy my curiosity as to why this odd behavior, please do. Thanks!

Revansx (talkcontribs)
  • MW 1.34
  • Chameleon 3.0.1

I tried adding custom CSS to MediaWiki:Chameleon.css and could not get it to work.

Exact same CSS added to User:<myusername>/chameleon.css does.

How can I get MediaWiki:Chameleon.css to work?

Pretor~nowiki (talkcontribs)

Will Vector skin continue to work after activating Chameleon skin, so users can choose between them?

F.trott (talkcontribs)

Yes, that should work.

Reply to "Chameleon and Vector"

How to define or modify icons?

T0lk (talkcontribs)

Extension:Echo adds some notifications that appear to be broken in the skin, see:

I'm wondering how these can be fixed? It seems like this may be controlled by chameleon/resources/styles/_variables.scss under $cmln-icons: map-merge((... but I don't know how to add new properties here.

In File:ChameleonSkinNav.png this image there are icons next to each of the links like "Recent Changes". Any way to add icons next to other things, or remove those icons? Here is what it looks like on my wiki: (talkcontribs)

I have the exakt same problem, the icons show up 2.5 times in the menu.

BertrandGorge (talkcontribs)
Reply to "How to define or modify icons?"

How to change the size of the logo in navbar?

Summary by Kghbln
Sochin67 (talkcontribs)

Hi all,

I'm using the navhead setup of Chameleon and it appears that the size of my wiki logo inside the navbar is far too small. Therefore I need to either increase the size of the logo or the height of the navbar.

To my understanding this needs to be done by defining the correct SCSS variables in the LocalSettings.php, right? However, so far I was unable to figure out the right variables to do so. There is a list available online but it's huge and I couldn't find any obvious variables to use.

Does anybody have a hint for me, please?

Thank you!



Federicodip (talkcontribs)

Hi @Sochin67,

i manage this with adding those line to my localsettings.php

$egChameleonExternalStyleVariables = [ 'nav-link-padding-y' => '1.5rem',];

To fine tune and fix the search box padding to have it in the middle height of the bar I also added in localsettings.php a call to a custom scss file called skinChameleonMod.scss:

$egChameleonExternalStyleModules = [

    __DIR__ . '/customizations/skinChameleonMod/skinChameleonMod.scss' => 'afterMain',


and in that file i wrote some custom css like that:

.p-navbar .navbar-form {

padding-top: $nav-link-padding-y - $font-size-base / 2;


Hope it helps, it worked for me