TinyMCE messing up links

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
tmorton

TinyMCE messing up links

Post 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
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm

Re: TinyMCE messing up links

Post 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.
Greg
Utter Design

Re: TinyMCE messing up links

Post 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…?
arwecdjc

Re: TinyMCE messing up links

Post 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.
Last edited by arwecdjc on Thu Mar 10, 2005 4:00 am, edited 1 time in total.
petroski

Re: TinyMCE messing up links

Post 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!
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE messing up links

Post by Ted »

Can some other people please test the remove_script_host thing?  I'd like it if any kind of URL worked.
arwecdjc

Re: TinyMCE messing up links

Post 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!
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: TinyMCE messing up links

Post by Ted »

I've finally added this fix to SVN.  It's working great.  petroski, thanks so much for that fix.
jptechnical
Forum Members
Forum Members
Posts: 131
Joined: Wed Jan 12, 2005 12:18 am

Re: TinyMCE messing up links

Post 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
Locked

Return to “CMSMS Core”