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 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: [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