sub folder being added to upload directory URL

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

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 studio-a - November 9, 2009 - edited: November 10, 2009

Hi Dave,

We are accessing the website with the same URL.

Example Accessing Website
------------------------------------------------------
http://www.clientname.ourcompany.com/index.php
http://www.clientname.ourcompany.com/cmsAdmin/admin.php
------------------------------------------------------

Just to be clear, by NOT checking the enable "Save Full URL" option we could be causing the problem, is this correct? We HAVE tried checking the option to include the Full URL path and NOT checking the option, but the subfolder still shows up in the URL either way after reviewing the properties of the missing image via the web browser.


Keep in mind this only happens for the images related to the files we create within the "pages" directory. If we create a page within the root directory for the client (for example the index.php page) it works fine. When we create a page with the “Pages folder” the URL ads the path with the page folder.
--------------------------------------------------------
Examples FULL URL options checked:


INDEX.PHP (URL for image seen via the web browser properties)
http://www.clientname.ourcompany.com/cmsAdmin/uploads/imagename.jpg

TEST.PHP located in “pages” directory NOTE: website hierarchy
(URL for image seen via the web browser properties)
http://[font "Calibri"] www.clientname.ourcompany.com /pages/cmsAdmin/uploads/imagename.jpg



------------------------------------------------------
This is how we have the Website Hierarchy setup:
Clientfolder/
index.php
/cmsAdmin/uploads/imagename.jpg
/images
/pages/test.php
/includes
--------------------------------------------------------
In addition, we have doubled check to verify that NO custom paths have been created. Can you shed some light on why cms Builder is adding the sub-directory to the URL?

studio-a

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