Bad content_image path on html output after 1.8.2->1.9.2

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
JasperE
New Member
New Member
Posts: 8
Joined: Tue Nov 24, 2009 9:02 pm

Bad content_image path on html output after 1.8.2->1.9.2

Post by JasperE »

Hey all,

I have just upgraded from 1.8.2 to 1.9.2 and I'm running into a problem with the {content_image} tags in my templates. After the upgrade content_images are broken on my website because the path shows a double uploads path "uploads/uploads" in the html output.
Example:
- <img src="http://www.mysite.net/[b]uploads/uploads[/b]/images/headers/header1.jpg" name="header" alt="nicegraph" />
It should look like:
- <img src="http://www.mysite.net/[b]uploads[/b]/images/headers/header1.jpg" name="header" alt="nicegraph" />

Also in the content-editor in the control panel all previously selected and saved images are forgotten after the upgrade (as in not set). I can select the images again and save the page, but I really don't want to do that for all of my content.

Any ideas to what's causing this and how to fix this? Any help would be greatly appreciated.

Config.php entries:

Code: Select all

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.mysite.net';
#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '/home/myaccount/domains/mysite.net/public_html/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images';
Content_image block as defined in template:

Code: Select all

{content_image block="Header_afbeelding" dir="images/headers" alt="nicegraph"}
JasperE
New Member
New Member
Posts: 8
Joined: Tue Nov 24, 2009 9:02 pm

Re: Bad content_image path on html output after 1.8.2->1.9.2

Post by JasperE »

This seems to fix the problem:

Code: Select all

UPDATE cms_content_props SET `content`=SUBSTRING_INDEX( `content` , '/' , -1 ) 
WHERE content LIKE 'uploads%/%.jpg';
(And of course, then clear the cache)

But yet I'm still wondering if there are neater ways to fix this. Like changing the config or something. Any input would still be appreciated!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Bad content_image path on html output after 1.8.2->1.9.2

Post by Dr.CSS »

This is most likely fixed in 1.9.3, which may come out this weekend, hopefully...
JasperE
New Member
New Member
Posts: 8
Joined: Tue Nov 24, 2009 9:02 pm

Re: Bad content_image path on html output after 1.8.2->1.9.2

Post by JasperE »

Fixed soon? That's good to hear!
I figured it was misconfigured on my end somewhere as {content_image} is marked as being fixed in this topic: http://forum.cmsmadesimple.org/viewtopi ... =3&t=48822
(I did install the svn rev mentioned in that topic start)
Maybe it's a good idea to recognize this as a bug until 1.9.3 is released so that others won't also look for the problem in their configurations.
Locked

Return to “[locked] Installation, Setup and Upgrade”