Forums Instiki

SVG editor doesn't work

Subscribe to SVG editor doesn't work 5 posts, 3 voices

 
bcs 11 posts

When I try to add an SVG graphic in a page using the Create SVG button, the popup windows doesn’t display anything. From the log it seems that it is unable find the css file


Processing WikiController#editor (for 127.0.0.1 at 2021-09-25 09:55:03) [GET] Parameters: {“web”=>“svg-edit”, “id”=>“jgraduate/css/jGraduate.css”} Rendering template within layouts/error Filter chain halted as [:connect_to_model] rendered_or_redirected. Completed in 4ms (View: 1, DB: 3) | 404 Not Found [http://localhost/svg-edit/editor/jgraduate/css/jGraduate.css]


Could someone please look into the issue and help?

 
distler Moderator 125 posts

Do you have a Web named “svg-edit”?

 
bcs 11 posts

No I do not have any wiki (web) of that name. Or even a page. I got the same error when I tried it with different browsers also (with and without any extensions/addons).

 
distler Moderator 125 posts

The problem isn’t on the browser end, but rather on the server end. Instiki is misinterpreting your browsers request for that file (which resides under public/svg-edit/editor/jgraduate/css/jGraduate.css) with a request for a wiki page (in a web named svg-edit). That’s not a problem I’m seeing on any of my Instiki installations. So I’m trying to figure out what’s “different” about yours.

 
smith anderson 1 post

This looks like a path or routing issue rather than a browser issue.

The request is trying to load:

/svg-edit/editor/jgraduate/css/jGraduate.css

but Instiki is treating it like a wiki page request under the web name svg-edit:

/svg-edit/…

That is why it returns 404 instead of serving the CSS file as a static asset.

A few things to check:

  1. Make sure the svg-edit folder actually exists in the public directory, not inside a wiki/web directory.

The expected file should be somewhere like:

public/svg-edit/editor/jgraduate/css/jGraduate.css

  1. Check the exact capitalization of the file and folder names.

On Linux servers, file paths are case-sensitive. For example:

jGraduate.css

is not the same as:

jgraduate.css

or

JGraduate.css

  1. Check whether your Instiki routing is catching static asset paths.

If static files are not being served before wiki routes, Instiki may interpret /svg-edit/… as a wiki web instead of a public asset path.

  1. Try opening the CSS file directly in the browser:

http://localhost:2500/svg-edit/editor/jgraduate/css/jGraduate.css

If that gives 404, the problem is definitely the static file path or asset serving setup.

  1. If the file exists but still gives 404, check the server configuration and make sure the public directory is being served correctly.

In short, the SVG popup is blank because the editor CSS is not loading. The main fix is to make sure the svg-edit assets are placed under the public/static asset path and that Instiki does not route those asset URLs as wiki page requests.

Forums Instiki