Page MenuHomePhabricator

Drawio don't show font in MediaWiki
Open, MediumPublic

Description

I installed DrawIo in my MediaWiki and want to creat a drawing.

Following issue is happend:

I edit the soruce code of my wiki page with {{#drawio:XY}} and save the page.
Now i can open the drawio editor without issues.
I can also draw with them and editing everything i want.

But if i want to create something with font and i save it after creating, the font doesent exist in the normal user view...
If i reopen the editor I see the font...

This is what i see in the editor:
!image

This is what I see on the website after saving:
!image

Any Idea?

Version: 14.1.8.

Event Timeline

Reedy renamed this task from Drawio don't show font in mediaWiki to Drawio don't show font in MediaWiki.Jan 6 2021, 9:00 PM

Can you tell which browser you are using? Are there any plugins like Adblockers installed?

Osnard raised the priority of this task from Low to Medium.

@Juju-bln: Could you please answer the last comment? Thanks in advance!

I have the same problem in Chrome, Edge and Firefox. No diagram text is rendered.

The fix by @Peesc works, however it also requires you to add 'http://www.w3.org/1999/xhtml' to $validNamespaces in includes/upload/UploadBase.php.

Although this topic is quite old - I'm struggeling with it. I want to setup Wikimedia 1.35.3-1040 with draw.io 17.4.3 (running as separate Docker instance) on my Synology DS220+.

I made both changes as described above, but still can't see any text (font) within the drawing. I have absolutely no clue where to start searching for any hint what's going wrong.

Is there any developer here who can give me a hint?

Although this topic is quite old - I'm struggeling with it. I want to setup Wikimedia 1.35.3-1040 with draw.io 17.4.3 (running as separate Docker instance) on my Synology DS220+.

I made both changes as described above, but still can't see any text (font) within the drawing. I have absolutely no clue where to start searching for any hint what's going wrong.

Is there any developer here who can give me a hint?

Hmmm, I also changed the following line inside the src/DrawioEditor.php but not sure if it's related (Guess it's only a problem with interactive mode)

-                               $img_fmt = '<object id="drawio-img-%s" data="%s" data-editurl="%s" type="text/svg+xml"
+                               $img_fmt = '<object id="drawio-img-%s" data="%s" data-editurl="%s" type="image/svg+xml"

That's all I've changed for a running Draw.io Mediawiki 1.35.X instance :)

Mh... it's working now.... I didn't change anything and just checked layout from my smartphone - it worked correctly.

Another check with my Linux-Laptop: all 3 browsers (Chrome, Opera and Firefox) show the text inside the box and even linking from within the flowchart works. Strange, but great!

The change of image type from text/svg to image/svg I made before as well. Without firefox didn't show the chart at all.

thanks anyway.

I experienced the same issue with SVG documents not displaying the text. MediaWiki 1.37, DrawioEditor master 01 Aug 2022, Browser Edge 103.0.1264.77 on OS-X
Fix was all of the resolutions provided above -