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

Charts not showing up #17

Open
nvcleemp opened this issue Oct 15, 2020 · 4 comments
Open

Charts not showing up #17

nvcleemp opened this issue Oct 15, 2020 · 4 comments

Comments

@nvcleemp
Copy link

nvcleemp commented Oct 15, 2020

We are having an issue with charts not showing up. Usually the chart will show once we have edited the page and saved the changes. However, if we then reload the page (and on successive page loads) the chart is not shown. Since the chart is rendered correctly the first time, I don't think the issue is with our chart. Below is a small example that exhibits the problem on our system.

<flow>
sequenceDiagram
  autonumber
  participant PT as P Tool
  participant PS as P Server
  participant ow as O webserver
  participant ob as O backoffice
  PT -->>+ PS: request access to site
  PS -->> ow: POST account data
opt New account
  ow -->> ob: create account
end
  ow -->> PS: response: token
  PS -->>- PT: redirect browser to site using token
  PT -->> ow: follows redirect
</flow>

If the chart is not showing, we see the following error message in the console:

Uncaught Error: Parse error on line 1:

^
Expecting 'NEWLINE', 'SPACE', 'GRAPH', got 'EOF'
    at Vt.parseError (mermaid.min.js:24)
    at Vt.parse (mermaid.min.js:24)
    at Dt (mermaid.min.js:34)
    at Object.render (mermaid.min.js:34)
    at a (mermaid.min.js:41)
    at Object.init (mermaid.min.js:41)
    at Ba (mermaid.min.js:34)
    at mermaid.min.js:38

If I look at the page source, then I see that the flow chart code is replaced by an empty <div> tag:

<div class="mermaid"></div>

We are using Hogfather and the flowcharts plugin is updated to the latest version.

@flaminggoat
Copy link

I also have this issue.

@gilcot gilcot mentioned this issue Nov 2, 2020
@gabuzom
Copy link

gabuzom commented Nov 3, 2020

Have the same problem.

Tried to manually update mermaid.min.js to the latest version, and at least, when I reload the page after seeing the flowchart OK for the first time, I got this strange mermaid.js error message "syntax error in graph" (when it rendered well once just saved)

It gets weirder: if I display an old revision of the graph, it will ALWAYS display OK!

I don't quite know what to try now.... Anyone has an idea on how to diagnose/bypass/fix this annoying bug?

@jackmcrider
Copy link

For me, it helped adding an empty line before the </flow>

@ddchrist
Copy link

Tested your example with latest commit on Hogfather with succes :) and purpose an issue close.

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

No branches or pull requests

5 participants