TinyMCE and internal links issue

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

TinyMCE and internal links issue

Post by Holger » Sat Jan 14, 2012 12:45 am

I think the way how TinyMCE creates internal links is not "optimal":

Links to internal pages should not include $sn. That makes moving the installation to another folder hard:
Example href:
"/subfolder/?page:subpage".

Better should be only "?page:subpage"

/plugins/tinymce/links.php:

Code: Select all

- $list.='["' . $spacer . ' ' . substr(str_replace('"', '"', $h[$i]), 0, 30) . '", "' . $sn . '?' . $u[$i] . '"],'; 
+ $list.='["' . $spacer . substr(str_replace('"', '"', $h[$i]), 0, 30) . '", "?' . $u[$i] . '"],'; 
KR
Holger

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: TinyMCE and internal links issue

Post by cmb » Sat Jan 14, 2012 2:32 am

Hello Holger,

I wouldn't regard this issue as a bug, but indeed, your suggestion is very reasonable (and easy to implement :)), so I'll add it to the roadmap for 1.5.2.

But one thing to consider: the URLs that are inserted by tinyMCE are adjusted by the editor anyway (relative vs. absolute). So IMO it would be nice, if the editors were able to treat all URLs as relative to the calling index.php. I've implemented this a while ago for Whizzywig, as it wasn't able to keep relative URLs at all. :roll:

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: TinyMCE and internal links issue

Post by Holger » Sat Jan 14, 2012 11:44 am

Hi Christoph,
cmb wrote:I wouldn't regard this issue as a bug
That's why I addressed it at issue ;) .

Maybe it's a good idea to remame this forum to "Bugs & Issues" ?
cmb wrote:So IMO it would be nice, if the editors were able to treat all URLs as relative to the calling index.php.
+1

KR
Holger

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: TinyMCE and internal links issue

Post by cmb » Sat Jan 14, 2012 1:28 pm

Hi Holger,
Holger wrote:Maybe it's a good idea to remame this forum to "Bugs & Issues" ?
I guess the admin of the forum has to decide this ;) -- however, that's fine with me. Another possibility might be to post such things to "Open Development".
cmb wrote:So IMO it would be nice, if the editors were able to treat all URLs as relative to the calling index.php.
AFAIK that's not possible for tinyMCE without making changes to tinyMCE's core, what might not be a good idea for update reasons.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: TinyMCE and internal links issue

Post by Holger » Sat Jan 14, 2012 2:18 pm

cmb wrote:I guess the admin of the forum has to decide this ;)
Hehe :D

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: TinyMCE and internal links issue

Post by cmb » Sat Feb 11, 2012 2:53 pm

Hi Holger,

I've just checked the issue. Indeed the current version inserts the links with $sn prepended to the link dialog, but tinyMCE removes the $sn part nonetheless in the generated (X)HTML.

But, however, as it's more consistent and nobody seems to have arguments against it, I've commited your proposed change to SF (rev. 165).
cmb wrote:
cmb wrote: So IMO it would be nice, if the editors were able to treat all URLs as relative to the calling index.php.
AFAIK that's not possible for tinyMCE without making changes to tinyMCE's core, what might not be a good idea for update reasons.
It seems, I was wrong. tinyMCE inserts the links relative to the calling index.php.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply