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

No edit button, and link displayed in editor on adding a drawio diagram #14

Open
davethehat opened this issue Jan 6, 2019 · 8 comments

Comments

@davethehat
Copy link

davethehat commented Jan 6, 2019

I have an empty page with a single test diagram:
{{#drawio:TestDiagram2}}

Displaying the page shows a placeholder saying simply:

TestDiagram2
empty draw.io chart

No drawio edit button is present. When I load the visual editor I see a template section for the drawio content, and then a link as follows:

TestDiagram2 empty draw.io chart

<a id='drawio-img-href-1915653392' href=''><img id='drawio-img-1915653392' src='' title='drawio: TestDiagram2' alt='drawio: TestDiagram2' style='height: auto; width: 100%; max-width: 0; display:none;' /></img></a>

I'm running mediawiki in docker, and have visual editor, code syntax highlighting and SVG support enabled:

MediaWiki | 1.31.1
PHP | 7.1.25 (apache2handler)
MariaDB | 10.1.37-MariaDB
ICU | 57.1

VisualEditor | 0.1.0 (6854ea0)22:33, 5 November 2018 | MIT | Visual editor for MediaWiki | Alex Monk, Bartosz Dziewoński, Christian Williams, David Lynch, Ed Sanders, Inez Korczyński, James D. Forrester, Moriel Schottlender, Roan Kattouw, Rob Moen, Timo Tijhof, Trevor Parscal, C. Scott Ananian and others
DrawioEditor | 1.0 |   | draw.io flow chart creation and inline editing | Markus Gebert
SyntaxHighlight | 2.0 | GPL-2.0-or-later | Provides syntax highlighting  using Pygments - Python syntax highlighter | Brion Vibber, Tim Starling, Rob Church, Niklas Laxström, Ori Livneh and Ed Sanders
NativeSvgHandler | 1.2 |   | Serves SVG images directly to clients | Povilas Kanapickas, Ilaï Deutel

Any thoughts as to what might be happening?

@davethehat
Copy link
Author

OK - so this is down to the drawio extension and VisualEditor not playing nicely together. It would be awesome if they did: are there any plans to work on this?

@kaijauk
Copy link

kaijauk commented Feb 14, 2020

Well, I have the same problem now, using mediawiki 1.33.1 - someone now how to fix this? :)

@davethehat
Copy link
Author

in our environment this seemed to be down to whether the user was logged in or not. If logged in, Visual Editor and drawio worked nicely for us.

@polymathuk
Copy link

I have the same problem so I can't use the extension at all. With no edit button how can the editor be invoked?

Mediawiki 1.35
PHP 7.3
MariaDB 10

@tuxedo0801
Copy link

Same issue here. It worked for months. Now I can only see my already created images/drawings, but there's no edit button any more :-( Any help?!

@tuxedo0801
Copy link

tuxedo0801 commented Nov 3, 2020

Tried to debug this a bit. Seems that the DrawIO JS is not loaded at all?!

LocalSettings.php still contains:

require_once "$IP/extensions/DrawioEditor/DrawioEditor.php";

is this no longer sufficient or what?

[update]

The only thing that has changed in last months: PHP Version and switch from MySQL to Maria DB.

Still using MW 1.30.0 and DrawIO Extension 1.0 ...

Updating to DrawIO Extension 1.1 - see download from https://www.mediawiki.org/wiki/Extension:DrawioEditor did not solve it (caused more problems), also using the github latest version also did not help

@tuxedo0801
Copy link

tuxedo0801 commented Nov 3, 2020

Found out it relates to

        /* check for conditions that should or will prevent an edit of the chart */
        $readonly = (!$wgEnableUploads
            || (!$img && !$wgUser->isAllowed('upload'))
            || ($img && !$wgUser->isAllowed('reupload'))
            || $parser->getTitle()->isProtected('edit')
            );

Looks like one of the conditions tends to false which let readonly be true ... will further investigate.

[update]
oh, damn... found the issue. I protected the page to "admin only", that caused the edit-button to disappear.

@gripfastistech
Copy link

oh, damn... found the issue. I protected the page to "admin only", that caused the edit-button to disappear.

I also experienced the "no edit button" but my user guide was on a locked admin only page.

After removing the admin lock, the extension works (mediawiki 1.27) and I have visual editor installed also.

Marking the page with draw.io extension admin-only-move doesn't effect it. Working, thanks @tuxedo0801!

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