ProfessionalWiki / Bootstrap

Provides the Bootstrap 4 web front-end framework to MediaWiki skins and extensions
https://www.mediawiki.org/wiki/Extension:Bootstrap
Other
15 stars 13 forks source link

need help using bootstrap extension #11

Closed oetterer closed 4 years ago

oetterer commented 4 years ago

Hi Stephan

I finally found the time to upgrade BootstrapComponents. Unfortunately I ran into a small problem. Maybe you can give me some pointers on where to look.

system

PHP 7.3 MW 1.34 MariaDB 10.3 Smw 3.1.4

Chameleon 2.1.0 Bootstrap 4.0 (8736060) SCSS 1.0 (5cf8c1c)

problem

Compilation of bootstrap styles by the scss extension produces an exception, mw subsequently is missing all the bootstrap styles.

hook registrations

as suggested by the documentation (which is great, by the way, thanks!)

'ParserAfterParse' => function( Parser &$parser, &$text, \StripState &$stripState ){
    $parser->getOutput()->addModules( 'ext.bootstrap.styles' );
    $parser->getOutput()->addModules( 'ext.bootstrap.scripts' );
    return true;
},

'SetupAfterCache' => function() {
    BootstrapManager::getInstance()->addAllBootstrapModules();
    return true;
},

scenarios:

  1. when not loading my extension, chameleon works, all styles are loaded (style module zzz.ext.bootstrap.styles)
  2. when loading my extension network request analyse shows load.php is called for modules 'ext.bootstrap.styles' and 'zzz.ext.bootstrap.styles'. however, both contain the error message shown below.

It makes no difference if I first load the skin or the extension.

error message

https://localhost/w/load.php?debug=true&lang=en&modules=ext.bootstrap.styles&only=styles&skin=chameleon

contains

/* SCSS compile error: expecting color, function received: <path to mw>/skins/chameleon/resources/styles/_variables.scss on line 36*/
oetterer commented 4 years ago

closed by #12