CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#6358] {content_image assign="..."} doesn't assign image full path

avatar
Created By: Jean-Sebastien Monzani (jsmonzani)
Date Submitted: Tue Apr 05 02:28:25 -0400 2011

Assigned To:
Version: 1.9.4.1
CMSMS Version: None
Severity: Critical
Resolution: Won't Fix
State: Closed
Summary:
{content_image assign="..."} doesn't assign image full path
Detailed Description:
Hello,

I've discovered this bug with 1.9.3 and 1.9.4.1
When using content_image with dir, the assign parameter doesn't correctly assign
the full image path to the variable (as previously) but only the filename.

For instance, selecting image foo.jpg in the backend through this tag:
{content_image block='myimg' dir='images/photos' assign="myimg"}

results in 1.9.4.1 in
$myimg  =  " foo.jpg"

instead of
$myimg  =  "uploads/'images/photos/ foo.jpg"
as with previous versions of CMSMS.

This breaks consistency as old pages I've created have the parameter correctly
stored in the database with full path, whereas new pages get filenames without
path.
Thank you!

---FIX---
From what I see, Content.inc.php has been modified at line 771 and the path was
commented out!
		$optprefix = '';
		//$optprefix = 'uploads';
		//if( !empty($blockInfo['dir']) ) $optprefix .= '/'.$blockInfo['dir'];
Restoring it to:
		//$optprefix = '';
		$optprefix = 'uploads';
		if( !empty($blockInfo['dir']) ) $optprefix .= '/'.$blockInfo['dir'];
works.


History

Comments
avatar
Date: 2012-03-02 15:31
Posted By: Goran Ilic (uniqu3)

At this moment, fixing this behavior would break any 1.9.x or 1.10.x
installation, therefor closing this report.
Any older install can still easily be fixed by adding missing path.
      
Updates

Updated: 2012-03-02 15:31
resolution_id: 10 => 8
cmsms_version_id: => -1
state: Open => Closed

Updated: 2011-04-08 03:21
assigned_to_id: 4160 => 100

Updated: 2011-04-05 03:08
description: Hello, I've discovered this bug with 1.9.3 and 1.9.4.1 When using content_image with dir, the assign parameter doesn't correctly assign the full image path to the variable (as previously) but only the filename. For instance, selecting image foo.jpg => Hello, I've discovered this bug with 1.9.3 and 1.9.4.1 When using content_image with dir, the assign parameter doesn't correctly assign the full image path to the variable (as previously) but only the filename. For instance, selecting image foo.jpg
resolution_id: => 10