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

Attempting to reopen a chart gives Invalid mime error #6

Open
shadow7412 opened this issue Aug 31, 2017 · 4 comments
Open

Attempting to reopen a chart gives Invalid mime error #6

shadow7412 opened this issue Aug 31, 2017 · 4 comments

Comments

@shadow7412
Copy link

shadow7412 commented Aug 31, 2017

Create a page, and place {{#drawio:TestChart}} in it. Save page.
Edit the chart, and save.
At this point there is a gaping white whole where the chart was. A refresh brings it up however.

However the real fun starts now - when I go to edit the newly created chart, I get an invalid mime type error.

The full error message is:

Invalid mime type when loading image from wiki:
Actual: image/png / Expected: image/svg+xml
Image: /images/thumb/2/23/TestChart.drawio.svg/121px-TestChart.drawio.svg.png?ts=20170831044519

It seems possible that for some reason, draw.io is being sent the url to the png version rather that svg it desires. I have not set $wgDrawioEditorImageType so svg should still be the default. Also I'm using the tag in it's simplest form; {{#drawio:TestChart}} so there's no |png even though I'd be surprised if that were the cause.

@strikegun
Copy link

the pull request solves the problem. look at it.

@shadow7412
Copy link
Author

shadow7412 commented May 30, 2018

I just tried out your PR @strikegun

When I go to save, I'm getting this error;

The wiki returned the follwing error when uploading:
[d1afff0368b2aceb877d5eb3] Exception caught: Could not open lock file for "mwstore://local-backend/local-public/2/21/TestChart.drawio.svg".

There is a typo in that message (follwing), but that's a side issue to the fact I'm getting this message in the first place :P

Any ideas?

@strikegun
Copy link

just google for the error.
I found https://www.mediawiki.org/wiki/Topic:U9uj8dpuz421v0yu
Seems trouble with your permissions? After I changed the line like in the pull request, the extensions works fine here at mine linux apache mediawiki.

@shadow7412
Copy link
Author

I admit that was unnecessarily lazy of me. That was indeed the issue.

I still have the problem where just after editing a new diagram the image is blank (solved with a refresh as above) but now I can actually edit them, so this PR solves the problem it set out to solve.

Thanks :)

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

2 participants