Gisellameloni / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

svg-edit is not working on lighttpd (can't see icons and draw) #498

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download svg-edit 2.4 or 2.5 from this website or svn
2. put it into the lighttpd www root and set permissions correctly (-R 777 
for sure)
3. open svg-editor.html in browser directly from disk
4. open svg-editor.html in browser through lighttpd

What is the expected output?
svg editor should work from lighttpd server same way as it works from disk 
or apache server.

What do you see instead?
svg editor does not load any images (toolbar, logo) and i am not able to 
see or draw anything. i can open/use/close preferences dialog and svg 
source textarea (by trying all those icons without images). canvas is dead. 
i can't use it at all.

i can use API to setSvg and getSvg which is also useless...

In what browser did you experience this problem? (ALL, Firefox, Opera 10
Alpha, etc)
Chromium, Firefox, Epiphany -> ALL

Please provide any additional information below.
It works with apache, but not on lighttpd. I can't understand... maybe some 
absolute/relative URLs or MIME type handling?

OS: ArchLinux (latest stable)
LigHTTPd package: lighttpd 1.4.26-1

Original issue reported on code.google.com by Harvi...@gmail.com on 20 Feb 2010 at 10:14

GoogleCodeExporter commented 9 years ago
btw i have checked traffic and there is NO 404 response, so svg-edit GETs 
everything 
it wants...

Original comment by Harvi...@gmail.com on 20 Feb 2010 at 10:14

GoogleCodeExporter commented 9 years ago
Is this maybe because lighttpd doesn't serve the SVG files with the correct 
MIME type?

Original comment by codedr...@gmail.com on 20 Feb 2010 at 11:00

GoogleCodeExporter commented 9 years ago
according to http://wiki.svg.org/MIME_Type i have added this to lighttpd.conf:

# mimetype mapping
mimetype.assign             = (
...
  ".svg"          =>      "image/svg+xml",
  ".svgz"          =>      "image/svg+xml",
...
 )

restarted server and reloaded cache of browser.
didn't helped at all...

Original comment by Harvi...@gmail.com on 21 Feb 2010 at 12:55

GoogleCodeExporter commented 9 years ago
i have exactly same ^^^ settings in apache and it works well...

Original comment by Harvi...@gmail.com on 21 Feb 2010 at 12:57

GoogleCodeExporter commented 9 years ago
just to make sure that this not a problem of the mimetype or how lighty wants 
it defined

Please can you try to create a mimetype of text/plain for an extension of 
".foo" and look if that works.

cheers
Reimar

Original comment by rb.p...@gmail.com on 26 Mar 2010 at 7:50

GoogleCodeExporter commented 9 years ago
0 ;) root@harvie-ntb ~ # echo foo > /srv/http/bar.foo
0 ;) root@harvie-ntb ~ # GET -e http://localhost/bar.foo
Connection: close
Date: Fri, 26 Mar 2010 11:38:01 GMT
Accept-Ranges: bytes
ETag: "591184349"
Server: lighttpd/1.4.26
Content-Length: 4
Content-Type: application/octet-stream
Last-Modified: Fri, 26 Mar 2010 11:34:30 GMT
Client-Date: Fri, 26 Mar 2010 11:38:01 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1

foo

0 ;) root@harvie-ntb ~ # nano /etc/lighttpd/lighttpd.conf
0 ;) root@harvie-ntb ~ # /etc/rc.d/lighttpd restart
:: Stopping lighttpd daemon                                  [DONE] 
:: Starting lighttpd daemon                                  [DONE] 
0 ;) root@harvie-ntb ~ # GET -e http://localhost/bar.foo
Connection: close
Date: Fri, 26 Mar 2010 11:36:17 GMT
Accept-Ranges: bytes
ETag: "591184349"
Server: lighttpd/1.4.26
Content-Length: 4
Content-Type: text/plain
Last-Modified: Fri, 26 Mar 2010 11:34:30 GMT
Client-Date: Fri, 26 Mar 2010 11:36:17 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1

foo

Original comment by Harvi...@gmail.com on 26 Mar 2010 at 11:39

GoogleCodeExporter commented 9 years ago
i have the same issue with Apache 2.2 on CentOS 5.3
(i have added svg mime to the server. as suggested)

this is what i get in firebug
$.getSvgIcon(icon_id) is undefined
http://pegasus1.weizmann.ac.il/moodle/lib/svg-edit-2.5/svg-editor.js
Line 2347

Original comment by nadavkav on 16 Aug 2010 at 5:47

GoogleCodeExporter commented 9 years ago
@nadavkav - I went here:
http://pegasus1.weizmann.ac.il/moodle/lib/svg-edit-2.5/svg-editor.html

And it works fine for me, no errors. Is the problem occurring on a different 
server?

Original comment by adeve...@gmail.com on 16 Aug 2010 at 6:19

GoogleCodeExporter commented 9 years ago
I had the same problem. It turned out that it only occured if I was logged in 
to a typo3 administrator site on the same server. When I logged out and cleared 
all private data on the browser then it worked.

Original comment by robert.l...@googlemail.com on 23 Nov 2010 at 4:25

GoogleCodeExporter commented 9 years ago
Well. Till now i didn't heard about "typo3 administrator site" and i am pretty 
sure that it was not installed on the server i tested and even if it was i 
don't see any reason why it should interfere with svgedit.

Original comment by harv...@gmail.com on 24 Nov 2010 at 12:40

GoogleCodeExporter commented 9 years ago
can anyone solved this problem?

Original comment by maanasi....@gmail.com on 24 Nov 2010 at 1:19

GoogleCodeExporter commented 9 years ago
Seems to be fixed for me (latest svg-edit + latest lighttpd). dunno what 
changed...

Original comment by harv...@gmail.com on 25 Nov 2010 at 4:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I fixed it for apache by adding:
    AddType image/svg+xml .svg

into the virtual host config.

-Cameron

Original comment by bloke...@gmail.com on 4 Jan 2011 at 1:01

GoogleCodeExporter commented 9 years ago
I had this problem too, on Apache/2.2.3 (CentOS). I have fixed it by adding the 
MIME type to the web server configuration, as Cameron and others have suggested 
in the previous comments. Access to the central configuration isn't needed, 
since you can add a MIME type in a .htaccess file too.

Original comment by marco.di...@gmail.com on 8 Jun 2011 at 9:16

GoogleCodeExporter commented 9 years ago
I have fixed this issue too.
by taking "Comment 14 by bloke...@gmail.com, Jan 3, 2011" advise

I have added a new .htaccess file to the svg-edit main folder
with "AddType image/svg+xml .svg" inside the file

Original comment by nadavkav on 25 Aug 2011 at 3:44