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

Error from line 30 of /srv/mediawiki/w/extensions/Mermaid/src/ServiceWiring.php: Class 'Mermaid\Config' not found #60

Closed
RhinosF1 opened this issue Oct 14, 2020 · 6 comments · Fixed by #63
Labels

Comments

@RhinosF1
Copy link

Setup and configuration

Issue

Produces a stack trace and outputs:

{{#mermaid:sequenceDiagram
participant Alice
participant Bob
  Alice->John: Hello John, how are you?
  loop Healthcheck
       John->John: Fight against hypochondria
  end
  Note right of John: Rational thoughts <br/>prevail...
    John-->Alice: Great!
    John->Bob: How about you?
    Bob-->John: Jolly good!
}}

Gives

2020-10-14 07:14:26 mw4 socdemwikiwiki: [044d1c37a175962eb645be42] /w/index.php?title=User:Godless_Raven/sandbox&action=submit Error from line 30 of /srv/mediawiki/w/extensions/Mermaid/src/ServiceWiring.php: Class 'Mermaid\Config' not found

Steps to reproduce the observation (recommendation is to use the sandbox):

@kghbln kghbln added the bug label Oct 14, 2020
@kghbln
Copy link
Member

kghbln commented Oct 14, 2020

Thanks for reporting. I created this on sandbox and the logs remain silent. Also the graph is shown.

@antibarbie
Copy link

I fell on the same trap today... so just adding my 2 cents to this issue....

Same code produces same problem with

  • a fresh install on mediawiki 1.35.1 / MySQL 8.0
  • a cloned repository ... of the 3.0.1-alpha
    But :
  • I Could NOT reproduce it when installing the 3.0.0 with ** composer --update**.

So : **Probably the solution is just that we didn't do the yarn install before using the extension ? **
The documentation is a bit unclear on this point (either composer --update or git clone ...)


[b3a35bc42ebad45948e29636] /wiki/index.php?title=Utilisateur:Julien&action=submit Error from line 30 of /var/www/mediawiki-1.35.1/extensions/Mermaid/src/ServiceWiring.php: Class 'Mermaid\Config' not found

Backtrace:

#0 /var/www/mediawiki-1.35.1/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}()
#1 /var/www/mediawiki-1.35.1/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()
#2 /var/www/mediawiki-1.35.1/extensions/Mermaid/src/MermaidParserFunction.php(54): Wikimedia\Services\ServiceContainer->getService()
#3 /var/www/mediawiki-1.35.1/includes/parser/Parser.php(3340): Mermaid\MermaidParserFunction::onParserFunction()

@kghbln
Copy link
Member

kghbln commented Jan 12, 2021

@antibarbie Thank you for your comment. I guess "I Could NOT reproduce it when installing the 3.0.0 with ** composer --update**." was a decisive information. Indeed this extension is only meant to be installed with Composer. I updated the documentation accordingly to make this clear and move out the MermaidJS update information to a separate developers only file.

@RhinosF1 I suspect that you cloned in this extension rather than using Composer. Is this assumption correct?

@RhinosF1
Copy link
Author

Git submodule but composer should be setup to run composer install. This is the second time composer has done weird though that I've been asked about. You can see our MediaWiki install under miraheze/MediaWiki and composer stuff in the puppet repo under extensionsetup.pp

@RhinosF1
Copy link
Author

I can still reproduce this on https://socdemwiki.miraheze.org/w/index.php?title=User:RhinosF1/sandbox&action=submit after whatever updates have happened in the last 3 months including that server being reinstalled.

@kghbln
Copy link
Member

kghbln commented Jan 13, 2021

Thank you for your feedback. It appears that @paladox was able to figure out what is going on and provided a pull request. Much appreciated.

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

Successfully merging a pull request may close this issue.

3 participants