Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$mermaidgDefaultTheme config variable is ignored #74

Open
ernstki opened this issue Sep 25, 2021 · 2 comments
Open

$mermaidgDefaultTheme config variable is ignored #74

ernstki opened this issue Sep 25, 2021 · 2 comments
Labels

Comments

@ernstki
Copy link

ernstki commented Sep 25, 2021

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 than forest, 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).

Bildschirmfoto 2021-09-25 um 10 19 38_thumb

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.

@ernstki
Copy link
Author

ernstki commented Sep 25, 2021

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.

@kghbln kghbln added the bug label Sep 25, 2021
@wobbba
Copy link

wobbba commented Nov 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants