Forum closed. New forum available at http://community.wymeditor.org/

Weird Problem(Works fine on localhost but not on Server)

Support forum for WYMeditor.

Weird Problem(Works fine on localhost but not on Server)

Postby icthegame on Sun Nov 16, 2008 9:47 pm

I've a Django(1.0) application with WYMeditor integrated as it's editor.

It works fine on localhost (Macbook, OSX 10.5.x) but when I put the same code on server (Centos, Apache2), I see below message instead of editor.

{Wym_Tools}
{Wym_Containers}{Wym_Classes}
{Wym_Html}{Wym_Iframe}{Wym_Status}
{Wym_Logo}

Not sure what's going wrong, can someone help me.
icthegame
 
Posts: 4
Joined: Sun Nov 16, 2008 9:42 pm

Re: Weird Problem(Works fine on localhost but not on Server)

Postby jfh on Mon Nov 17, 2008 9:23 pm

Sounds like a JS error - do you get an error message?
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Re: Weird Problem(Works fine on localhost but not on Server)

Postby icthegame on Mon Dec 08, 2008 3:43 pm

I've tried the same again with latest version of editor today (beta 2).

jfh wrote:Sounds like a JS error - do you get an error message?

Earlier it did not but now it says WYMeditor: error while parsing language file.

Code: Select all
<script type="text/javascript" src="http://media.domain.com/templates/js/jquery.js"></script>
<script type="text/javascript" src="http://media.domain.com/templates/js/wymeditor/jquery.wymeditor.pack.js"></script>
<script type="text/javascript" src="http://media.domain.com/templates/js/admin_textarea.js"></script>


admin_textarea.js:

$(document).ready(function() {
    $("textarea").wymeditor();
});



I've got lang directory and files under wymeditor/ (also able to access language files directly from browser)
Sorry for getting back so late, was on holiday :)
icthegame
 
Posts: 4
Joined: Sun Nov 16, 2008 9:42 pm

Re: Weird Problem(Works fine on localhost but not on Server)

Postby icthegame on Mon Dec 08, 2008 4:59 pm

Did some more search and I think I'm facing similar problem (http://trac.wymeditor.org/trac/ticket/92 )

All static media files are served using different subdomain (and may be Ajax failing to get lang file )
icthegame
 
Posts: 4
Joined: Sun Nov 16, 2008 9:42 pm

Re: Weird Problem(Works fine on localhost but not on Server)

Postby mr_lundis on Tue Dec 09, 2008 9:34 pm

Hi icthegame!

The easiest way to solve you problem is to load the language files manually by inserting a script tag below the WYMeditor source.

Code: Select all
<script type="text/javascript" src="http://media.domain.com/templates/js/wymeditor/lang/<lang>.js"></script>


Cheers!
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Weird Problem(Works fine on localhost but not on Server)

Postby icthegame on Wed Dec 10, 2008 2:06 pm

mr_lundis wrote:Hi icthegame!

The easiest way to solve you problem is to load the language files manually by inserting a script tag below the WYMeditor source.

Code: Select all
<script type="text/javascript" src="http://media.domain.com/templates/js/wymeditor/lang/<lang>.js"></script>


Cheers!


Hi, I've tried that but problem still persists (Below is the screenshot, tried in Firefox and Safari) . However Firebug did not showing any error this time and below is the order or JS files.

Picture 6.png
Picture 6.png (27.88 KiB) Viewed 17294 times


Code: Select all
<script type="text/javascript" src="http://media.domain.com/templates/js/jquery.js"></script>
<script type="text/javascript" src="http://media.domain.com/templates/js/wymeditor/jquery.wymeditor.js"></script>
<script type="text/javascript" src="http://media.domain.com/templates/js/wymeditor/lang/en.js"></script>
<script type="text/javascript" src="http://media.domain.com/templates/js/admin_textarea.js"></script>
icthegame
 
Posts: 4
Joined: Sun Nov 16, 2008 9:42 pm

Re: Weird Problem(Works fine on localhost but not on Server)

Postby m0nonoke on Wed Jul 15, 2009 9:25 pm

This is stil broken;

In the django settings module
Code: Select all
MEDIA_URL = 'http://127.0.0.1:8000/media/'


causes the same problem, however if you change it to "localhost" then it works fine - is there are problem with IP addresses rather then domain names?
m0nonoke
 
Posts: 2
Joined: Wed Jul 15, 2009 9:24 pm

Re: Weird Problem(Works fine on localhost but not on Server)

Postby jobaz on Wed Oct 28, 2009 9:23 am

Hello,

I have started using WYM editor today and have integrated it into my application.
I am developing a task management software based on PHP and Zend framework and I wanted to use that editor to input tasks.

It's working just fine on localhost, but once uploaded I face exactly the same problem as described above. The snapshot above actually is exactly what I get.

Unfortunately I have not found any ways to fix that problem yet. As for the localhost /127.0.0.1 setting change, I also could not find where to change it.

Could somebody provide me some insights?

Cheers.

Frederic
jobaz
 
Posts: 4
Joined: Wed Oct 28, 2009 9:17 am

Re: Weird Problem(Works fine on localhost but not on Server)

Postby mr_lundis on Wed Oct 28, 2009 6:42 pm

Hi!
As fas as I can tell it seems like you're having some cross domain request problems. This usually happens when you try to serve (some parts) of WYMeditor from a different (sub-)domain/port, like media.your-domain.com. When WYMeditor then tries to dynamically load say a language file from another host the browser same origin policies will block the request.

There are two easy ways to work around this:
1. You include all the needed files manually or
2. You serve all the WYMeditor resources from the same domain.

A for the MEDIA_URL setting its Django specific, and you wont find it any where in Zend Framework.

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Weird Problem(Works fine on localhost but not on Server)

Postby jobaz on Thu Oct 29, 2009 2:44 am

Thanks.

My project is located on a subdomain indeed.
But all files relevant to the project are located together.

I have tried to include the language file and tried again. Subsequently to that, I added all files that are present in the wym directory but somehow it still does not work.

Code: Select all
<script type="text/javascript" src="/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/js/wymeditor/jquery.wymeditor.pack.js"></script>
<script type="text/javascript" src="/js/wymeditor/jquery.wymeditor.min.js"></script>
<script type="text/javascript" src="/js/wymeditor/jquery.wymeditor.js"></script>
<script type="text/javascript" src="/js/wymeditor/lang/en.js"></script>
<script type="text/javascript" src="/js/wymeditor/skin/default/skin.js"></script>
<script type="text/javascript" src="/js/wymeditor/skin/compact/skin.js"></script>
<script type="text/javascript" src="/js/wymeditor/skin/minimal/skin.js"></script>
<script type="text/javascript" src="/js/wymeditor/skin/silver/skin.js"></script>
<script type="text/javascript" src="/js/wymeditor/skin/twopanels/skin.js"></script>
<script type="text/javascript" src="/js/wymeditor/plugin/embed/jquery.wymeditor.embed.js"></script>
<script type="text/javascript" src="/js/wymeditor/plugin/fullscreen/jquery.wymeditor.fullscreen.js"></script>
<script type="text/javascript" src="/js/wymeditor/plugin/hovertools/jquery.wymeditor.hovertools.js"></script>
<script type="text/javascript" src="/js/wymeditor/plugin/resizable/jquery.wymeditor.resizable.js"></script>
<script type="text/javascript" src="/js/wymeditor/plugin/tidy/jquery.wymeditor.tidy.js"></script>
   <script type="text/javascript">
      jQuery(function() {
          jQuery('.wymeditor').wymeditor();
   })
</script>



Am I missing something?
jobaz
 
Posts: 4
Joined: Wed Oct 28, 2009 9:17 am

Re: Weird Problem(Works fine on localhost but not on Server)

Postby mr_lundis on Thu Oct 29, 2009 6:43 pm

If your entire project is located on a subdomain, then it's most likely not the x-domain policies that causing problems. Do you think it would be possible for you to set up at test page?

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Weird Problem(Works fine on localhost but not on Server)

Postby jobaz on Fri Oct 30, 2009 2:35 am

Hi,

You may access the page: http://life.artbum.net/
I have included a simple WYM powered form.
Please note that the submit button is not functional.

Thank you in advance,

Frederic
jobaz
 
Posts: 4
Joined: Wed Oct 28, 2009 9:17 am

Re: Weird Problem(Works fine on localhost but not on Server)

Postby mr_lundis on Fri Oct 30, 2009 12:23 pm

Hello again!
The WYMeditor installation on your server is incomplete - a lot of files are missing. Try uploading the WYMeditor files one more time (the entire wymeditor directory), and give it another shot!

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Weird Problem(Works fine on localhost but not on Server)

Postby jobaz on Tue Nov 03, 2009 2:35 am

Thank you so much for the help!
Working just fine now!

Cheers!
jobaz
 
Posts: 4
Joined: Wed Oct 28, 2009 9:17 am


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests