We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

TinyMCE gets URLs to files wrong

Development and Programming

Tyssen's avatar
Tyssen
756 posts
17 years ago
Tyssen's avatar Tyssen

I’m using TinyMCE & iBrowser and when trying to link to a document (not an image), it’s adding the system folder name in front of {filedir_x} so that the path turns out wrong, e.g. www.mydomain.com/system_folder/http://www.mydomain.com/….rest of the file path.

(Disabling the TinyMCE extension makes the problem go away.)

Has anyone come across this before?

Also, is it possible to configure the editor to not insert / at the end of images because I’m not using an XHTML doctype?

       
Tyssen's avatar
Tyssen
756 posts
17 years ago
Tyssen's avatar Tyssen

It looks like because I had relative_urls : false in the TinyMCE settings. Setting it to true seems to have fixed it.

But I’d still like to know if there’s a way to modify iBrowser to not add trailing slashes to images.

       
Tyssen's avatar
Tyssen
756 posts
17 years ago
Tyssen's avatar Tyssen

Well, whaddaya know? It does validate.

       
Tyssen's avatar
Tyssen
756 posts
17 years ago
Tyssen's avatar Tyssen

Coming back to this again because although setting relative_urls : true solves the problem with non-image files getting the wrong path, it creates a problem for image files.

With relative_urls : true, the paths to PDFs, Word .docs etc is fine, but the image paths all have .. inserted in front of them which is wrong and you have to manually edit the HTML to remove the ..

With relative_urls : false you don’t have the problem with the images, but as mentioned in the first post, it adds the system folder at the beginning of the URL which can’t be edited manually (each time you save the post it reverts back again) - the only way to do it is to change the TinyMCE extension’s settings.

So is there any way to be able to have correct paths for both?

       
R.BIRD's avatar
R.BIRD
41 posts
17 years ago
R.BIRD's avatar R.BIRD

@Tyssen:

A little bit late, but I ran into the same problem today with TinyMCE and fixed it this way…

There are two configuration entries that need to be changed in the extension settings. By default, they may look like this:

relative_urls : false,
document_base_url : '\',

You will want to change them to:

relative_urls : true,
document_base_url : '',
       
Tyssen's avatar
Tyssen
756 posts
17 years ago
Tyssen's avatar Tyssen

Hey, that’s good to know. 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.