Mermaid
Mermaid copied to clipboard
$mermaidgDefaultTheme config variable is ignored
Setup and configuration
- Mermaid version: 3.0.1
- MediaWiki version: 1.35.3
- PHP version: 7.3.x
- Database system (MySQL, PostgresQL, etc.) and version: MySQL 5.7.x
Issue
The config variable $mermaidgDefaultTheme
is ignored, as is config.DefaultTheme.value
from extension.json
; Mermaid\Config::getDefaultTheme()
always returns forest
no matter what.
Well, it always returns forest
unless you modify it to return something else like default
or neutral
, or hard-code the theme value at MermaidParserFunction.php
line 80.
Steps to reproduce the observation:
- install Mermaid as per
INSTALL.md
- change
$mermaidgDefaultTheme
to something other thanforest
, as per INSTALL.md#configuration
Amplifying information
Step-debugging through src/Config.php
reveals that $this->globalConfig
is basically empty (at line 21) when Mermaid\Config::getDefaultTheme()
is invoked from within Mermaid\MermaidParserFunction::parse
(at line 80).
I assume this was meant to contain something, maybe settings from the config
section of extension.json
, or variables configured in LocalSettings.php
, but it's beyond my level of understanding at the present moment to exactly surmise what or why.
I can help with this if @howlowck wouldn't mind just giving me a shove in the right direction, as far as what was intended there in src/Config.php
.
Any updates on this?
EDIT: for anyone else encountering this problem: it gets cached, gotta update the chart to see changes, hardcoding in Config.php
works