Thumbnails not showing up in CMS if PREFIX_URL is set

5 posts by 2 authors in: Forums > CMS Builder
Last Post: August 17, 2013   (RSS)

I'm building a site for a client and incorporating a few slideshows. Each slideshow has its own image directory; the images being uploaded through the CMS. The client has a site already, but we're going to be switching servers when the new site is done. So I'm working on a server by accessing it using the IP address / ~client format: ex: http://111.222.333.44/~client

In CMS builder, under General Settings, I set a Website Prefix URL of /~client.

When I set up the slideshow table I created an upload field called 'slides' and set a custom upload directory. I also set the List Page Fields to: title, slides -- so that I can see the thumbnail of the image in the listing within the CMS. The problem is that the thumbnails are not showing up. It looks like the PREFIX_URL is not being added to the img src, so I'm getting a broken URL. The slideshow, however, works perfectly in the website.

I've tried a lot of different settings combinations and nothing seems to work. For example, I can get the thumbnails to show in the CMS, but then the slideshow breaks in the website.

By the way, I do not have this problem when the site is installed on a server without a PREFIX_URL. Everything works fine then.

Either I'm doing something wrong, or else one of the CMS files needs to be edited to add a missing PREFIX_URL constant. Could use your help.

Hope I was somewhat clear about the problem. If not, let me know and I'll give you a call.

Thanks.

Jim

WebCamp One, LLC



Websites That Work

Hi Jim,

I've done some local testing and you're correct, the upload path doesn't take into account the prefix URL. I've raised the issue with one of our senior developers to see if this is a bug or there is a reason the system is set up this way. I was still able to get my images to display correctly on both my main site and CMS Builder install, I think your settings need to be as follows:

Website Prefix URL (optional): /~client

Upload Directory: uploads/

Upload Folder URL: /~client/cmsAdmin/uploads/

These settings assume your uploads folder is in the default location (ie: /cmsAdmin/uploads).

I'll get back to you once we've resolved the bug. Let me know if you have any questions.

Cheers!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hi Jim,

Thanks for the feedback. 

One of our senior developers has gotten back to me, and the uploads URL not including the URL prefix is by design, so that you can host uploads outside of the prefixed directory if you require. We hope to expand on these settings in future releases and will make it clearer that the prefix is not added to the uploads URL.

Cheers!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks for the follow-up, Greg. That explanation makes sense. All seems to be working pretty well now.

Jim

WebCamp One, LLC



Websites That Work