sub folder being added to upload directory URL

6 posts by 2 authors in: Forums > CMS Builder
Last Post: November 11, 2009   (RSS)

By studio-a - November 9, 2009

Hello,

We are having trouble with the upload directory. The application is installed within a sub-domain on our dev server with its own FTP. Within cmsAdmin (General settings) we have the default location for the files to be uploaded (/cmsAdmin/uploads/). We also have turned OFF the checkbox for Admin > General > Advanced Settings: [ ] WYSIWYG Options - Save full URL for local links and images (for viewers on other domains). This way when we move the site no worries.

OUR PROBLEM.
------------------------------------------------------------------------------------
We upload an image via the WYSIWYG and it’s displays properly within the WYSIWYG. However, it does not show up within the live site when viewing via a web browser. The Code link from the web browser includes the “sub folder” where the actually page file is located within the URL. So the code is looking for image files within /subfolderName/cmsAdmin/uploads/. We check the HTML from WYSIWYG and it’s correct (without the sub folder) .

WYSIWYG CODE:
/cmsAdmin/uploads/

Web Browser CODE:
/HTMLFileSubFolderName/cmsAdmin/uploads/

------------------------------------------------------------------------------------

This is how we have the Website Hierarchy setup:

Clientfolder/
Index.php
/cmsAdmin/uploads/
/images
/pages
/includes

------------------------------------------------------------------------------------
01. Why does the application keep adding the page’s subfolder location thus causing an improper link?
02. How do we fix this?

Your help is greatly appreciated!

studio-a

Re: [studio-a] sub folder being added to upload directory URL

By Dave - November 9, 2009

Hi studio-a,

Are you accessing CMS Builder and the site through two different urls? Eg:

http://www.example.com/clientName/cmsAdmin/admin.php
http://www.clientName.com/index.php

If so, you need to either access the CMS and the website through the same url (www.clientName.com) or enable the "Save Full URL" option.

The reason is that the path to the images is different depending on the host. I'd recommend accessing both through the client url.

Let me know if that's the issue and if that helps.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [studio-a] sub folder being added to upload directory URL

By Dave - November 11, 2009

Hi studio-a,

That's very strange. I'm not sure. My first guess would be that there might be a <base href> tag in /pages/test.php. But that's a long shot.

Note that "Save Full Url" doesn't change images you've already uploaded, it only changes the url saved for new uploads.

If you'd like to email me the actual urls and CMS login details to dave@interactivetools.com along with some steps to recreate the issue I can take a look.

Note: Email only, don't post login details to the forum.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] sub folder being added to upload directory URL

By studio-a - November 11, 2009 - edited: November 11, 2009

Hi Dave,

Thanks for your reply. Actually we solved the problem!

It had to do with Tinymce and their settings. We had change a line of code within Tinymce's wysiwyg_custom.php file. Switching the line (relative_urls : true, ) back to False makes everything work perfectly again.

For the other members, you can customize the features that the WYSIWYG offers by duplicating the file wysiwyg.php and renaming it wysiwyg_custom.php (see path below for location). Within the custom file you can alter its code to add or remove Tinymce WYSIWYG features. For full details of the feature options see: http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference

cmsAdmin/lib/wysiwyg_custom.php

Just beware, if you change ""SOME" of the WYSIWYG settings for Tinymce it can override the cmsBuilder URL structure and settings as we found out.

Thanks again for your replies!


studio-a

Re: [studio-a] sub folder being added to upload directory URL

By Dave - November 11, 2009

Great, thanks for posting back to let us know it's working. And thanks for the tip! :)
Dave Edis - Senior Developer
interactivetools.com