google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

trouble with loading WymEditor media #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. edit settings.py in example project
2. set MEDIA_URL to 'http://localhost:8000/media/'
3. run development server on example project

What is the expected output? What do you see instead?
I expect to see everything on admin panel, but there's no toolbar icons on
WYMEDITOR i.e. when trying to add a new page

What version of the product are you using? On what operating system?
latest on Linux

Please provide any additional information below.
It causes similar problems when we have to set MEDIA_URL to something like
'http://media.foo.bar/pages/'

Original issue reported on code.google.com by slafs.e@gmail.com on 18 Sep 2009 at 5:02

GoogleCodeExporter commented 9 years ago
To be more precise... 
Ad3. Take a look on the project by entering 
http://127.0.0.1:8000/admin/pages/page/add/
If you set the MEDIA_URL to 'http://127.0.0...' then it's gonna be ok, but then 
if
you enter http://localhost:8000/admin/pages/page/add/ again it's gonna be 
"broken"

Original comment by slafs.e@gmail.com on 21 Sep 2009 at 6:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You should set you MEDIA_URL to something like `/media/` .... Don't add the 
host name 
before the path, it's wrong.

Original comment by batiste....@gmail.com on 21 Sep 2009 at 7:20

GoogleCodeExporter commented 9 years ago
http://docs.djangoproject.com/en/dev/ref/settings/#media-url

so what if i got my page on http://mycompany.foo.bar/ and my static files on
http://media.mycompany.foo.bar/? I don't think it's a bad approach. Django doc 
gives
as an example "http://media.lawrence.com"...

Original comment by slafs.e@gmail.com on 21 Sep 2009 at 8:02

GoogleCodeExporter commented 9 years ago
if you use 'http://localhost:8000/media/' then use 
'http://localhost:8000/media/'
If you use 'http://127.0.0.1:8000/media/' then use 'http://127.0.0.1:8000/'

I don't understand where is the problem. You should look at 404 in the local 
server
console output.

Original comment by batiste....@gmail.com on 21 Sep 2009 at 9:17

GoogleCodeExporter commented 9 years ago
the localhost and 127.0.0.1 was only an example. On production where my project 
URL
looks like this: http://mycompany.foo.bar/ I MUST set MEDIA_URL to something 
like
this http://media.mycompany.foo.bar/ and that configuration fails. Of course I 
can do
a workaround and link media dir so I can access it via
http://mycompany.foo.bar/media/ but it's an ugly trick and I'm not 
administrating the
server so I'd like to use prepared configuration for serving static files.

Original comment by slafs.e@gmail.com on 21 Sep 2009 at 9:45

GoogleCodeExporter commented 9 years ago
Oki I finaly understand your problem. Apparently some images and javascript 
files are 
not following the MEDIA_URL or/and PAGE_MEDIA_URL settings.

This need to be fixed!

Original comment by batiste....@gmail.com on 21 Sep 2009 at 6:00

GoogleCodeExporter commented 9 years ago
In addition I noticed the hardcoded "/media/pages/images/" in 
pages/media/pages/javascript/pages_form.js
pages/media/pages/javascript/pages_list.js

Original comment by slafs.e@gmail.com on 22 Sep 2009 at 5:38

GoogleCodeExporter commented 9 years ago
now rev 710 fix this media path bug

Original comment by m.meylan@gmail.com on 25 Sep 2009 at 9:53

GoogleCodeExporter commented 9 years ago
The latest revision still doesn't solve the **real problem** of this issue. 

Original comment by slafs.e@gmail.com on 27 Sep 2009 at 8:41

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 28 Sep 2009 at 11:27

GoogleCodeExporter commented 9 years ago
The issue is in the editor itself:

http://trac.wymeditor.org/trac/ticket/92

When it will be fixed there, I would be able to do something about it

Original comment by batiste....@gmail.com on 14 Oct 2009 at 2:34