Page 1 of 1
TinyMCE messing up links
Posted: Sat Mar 05, 2005 10:45 pm
by tmorton
Hi All,
I've been getting my site setup with CMS (Which rocks!) and TinyMCE (HTMLArea keeps crashing FF...sigh). TinyMCE seems to be working pretty well, except that TinyMCE is screwing up my links. It's doing something like this:
located here
And then if I resave the page, I get this:
located here
(e.g., another /Taj is added to the link.
CMS 0.9.2. Any ideas, this is driving me nuts

.
Thanks!
--
Taj
Re: TinyMCE messing up links
Posted: Sun Mar 06, 2005 10:32 pm
by Greg
Seems to be Firefox specific. I upgraded to TinyMCE 1.43 and a number of the bugs are gone but the insertion of images with firefox still produces the problems reported by tmorton. IE works great with the latest release of TinyMCE.
Re: TinyMCE messing up links
Posted: Tue Mar 08, 2005 7:45 pm
by Utter Design
I'm on a Mac and I'm not getting any joy whatever browser I use. IE and Safari don't even display the editor and FFox causes the multiple path error. i tried editing the actual HTML that Safari displays when you don't get TinyMCE but for some reason it doesn't seem to correct the error and the graphic remains undisplayed.
Has anyone here gotten it to work on a Mac at all…?
Re: TinyMCE messing up links
Posted: Wed Mar 09, 2005 2:47 am
by arwecdjc
Hi,
I am having the same problem as tmorton. Every time I insert a link in TinyMCE the root path (/arne in my case) is added to the URL. If I open the page again to edit the content another one or two root paths get added to each link in the page after pressing apply/submit (e.g. /arne/arne/arne/test.html). Even if I changed nothing in the page.
This happens for links to files in subdirectories and to files in the root directory of the CMSms installation. But this only happens if CMSms is installed in a subdirectory of the webserver and not in the root directory. The typical installations of CMSms in the root directory of a web server does not show this problem, because the root path / can not be added to the links.
Additionally as Greg mentioned this is related to Firefox, or better, browsers using the Gecko rendering engine (Epiphany in my case). The Internet Explorer works fine and does not add any path to the links. But IE is not an option for me, because I am using linux most of the time.
I tried to prevent the addition of the path by using the absolute and not the relative path for the links, but absolute paths to my page are converted to relative paths by TinyMCE although CMSms seems to use TinyMCE with the "relative_urls : false" option. (Another bug?)
Any new ideas or workarounds?
Thanks!
Update: I found a workaround that works for me. I added 'remove_script_host : "false"' to the TinyMCE.module.php and now I am able to use the absolute URLs (
http://my.url/diretcory/file). No root path gets added to this absolute URLs, only to relative URLs.
Re: TinyMCE messing up links
Posted: Thu Mar 10, 2005 3:52 pm
by petroski
Better yet, if you go to line 164 in TinyMCE.module.php and change:
relative_urls : "false",
to
relative_urls : "true", // default was false
This resolves the issue as well, FireFox does not mees with the links, just insert the relative path!
Re: TinyMCE messing up links
Posted: Thu Mar 10, 2005 9:00 pm
by Ted
Can some other people please test the remove_script_host thing? I'd like it if any kind of URL worked.
Re: TinyMCE messing up links
Posted: Thu Mar 10, 2005 10:38 pm
by arwecdjc
Yes, you are right, Petroski. I tried it with relative_urls : "true" and it works fine and it is definitely a better and easier solution than the "remove_script_host" option.
Thanks a lot!
Re: TinyMCE messing up links
Posted: Tue Mar 29, 2005 2:27 am
by Ted
I've finally added this fix to SVN. It's working great. petroski, thanks so much for that fix.
Re: TinyMCE messing up links
Posted: Sun Jun 19, 2005 7:32 am
by jptechnical
Looks like in 10.4 this has to be put back to relative_urls : false. Otherwise you get the following
in firefox: "../../../../undefined/
http://yourdomain.com"
in IE: you just don't get a link.
This is related to bug ID: 161
http://bugs.cmsmadesimple.org/view.php?id=161