Upload Paths & URL not working since upgrade to 2.09

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 4, 2011   (RSS)

By pcolvin - July 1, 2011

I recently upgraded a site to 2.09 from 2.06. After the upgrade, all of the paths and/or URLs for the uploads are not correct. I have checked the General Settings and the correct path and URL are there. Even when adding a new upload, the path in the URL on the viewer is not correct.

I looked in the cms_uploads table and in the filePath and urlPath fields just the file name is listed.

I have checked the permission of all files including the setting.dat.php and everything is as it should be.

I'm in a bit of problem spot with this site since the majority of the content is documents.

I'm going to roll back the site to a backup prior to the upgrade to get things working again. If anyone else has had this problem, or know how to fix it, that would be great.

pcolvin

Re: [pcolvin] Upload Paths & URL not working since upgrade to 2.09

By Jason - July 4, 2011

Hi,

CMSB 2.09 and above use relative paths to store uploads. When you retrieve your records from CMS Builder using getRecords, the filePath and urlPath will be populated automatically.

If you're not using getRecords to get records out of the uploads table, you can manually append it using the global $SETTINGS array. For example if you had a variable called image that was retrieved directly from the uploads table:

<img src = "<?php echo $SETTINGS['uploadDir'];?><?php echo $image['urlPath'];?>" />

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/