CMS MADE SIMPLE FORGE

CGSmartImage

 

[#6646] CGSmartImage doesn't display image after update

avatar
Created By: Square (square)
Date Submitted: Sun Jul 10 04:56:54 -0400 2011

Assigned To: Robert Campbell (calguy1000)
Version: 1.4
CMSMS Version: None
Severity: Critical
Resolution: Works For Me
State: Closed
Summary:
CGSmartImage doesn't display image after update
Detailed Description:
Hi,

After update the module to 1.4, the module doesn't display my images with the
following basic code :
<p>{CGSmartImage src='uploads/images/illustrations/1103-RNCP.jpg'}</p>

Adding options to this code doesn't change anything. Code source shows : <p>
</p>

Giving a wrong file destination shows smarty error : something like file not
found. This means the module is processed but doesn't output the code ?

Image cache file is created in uploads/_CGSmartImage folder



History

Comments
avatar
Date: 2011-07-10 11:00
Posted By: Robert Campbell (calguy1000)

Just tested...  works fine here.
      
avatar
Date: 2011-07-11 05:06
Posted By: Square (square)

Just downgrade to 1.3.1 and worked with this snippet :
<img src="{CGSmartImage src='uploads/images/illustrations/1103-RNCP.jpg'
filter_watermark=1 filter_resize='w,350' filter_grayscale=1}">

Went back to 1.4 with same snippet :
<img src="{CGSmartImage src='uploads/images/illustrations/1103-RNCP.jpg'
filter_watermark=1 filter_resize='w,350' filter_grayscale=1}">

==> nothing is displayed, neither in the source code and in the page.

Here's my config :

----------------------------------------------

Cms Version: [b]1.9.4.2[/b]

Installed Modules:

    CMSMailer: [b]2.0.1[/b]
    FileManager: [b]1.1.0[/b]
    MenuManager: [b]1.7.6[/b]
    ModuleManager: [b]1.4.2[/b]
    News: [b]2.11.3[/b]
    nuSOAP: [b]1.0.2[/b]
    Search: [b]1.6.10[/b]
    TinyMCE: [b]2.8.4[/b]
    FrontEndUsers: [b]1.12.16[/b]
    CustomContent: [b]1.7.3[/b]
    Forum: [b]0.9.4[/b]
    Captcha: [b]0.4.3[/b]
    CGUserDirectory: [b]1.2.4[/b]
    FormBuilder: [b]0.7[/b]
    TreeManager: [b]0.6.0[/b]
    CompanyDirectory: [b]1.8.3[/b]
    CGExtensions: [b]1.26.2[/b]
    CGSimpleSmarty: [b]1.4.8[/b]
    CGFeedback: [b]1.3.5[/b]
    CGCalendar: [b]1.7.1[/b]
    CGFeedMaker: [b]1.0.14[/b]
    Uploads: [b]1.12[/b]
    NMS: [b]2.3.2[/b]
    CGBlog: [b]1.7.5[/b]
    FEmessages: [b]1.1[/b]
    MysqlDump: [b]1.2.4[/b]
    FEUMailer: [b]0.9.4[/b]
    LinkMgr: [b]1.5.1[/b]
    Gallery: [b]1.4.4[/b]
    CGGoogleMaps: [b]2.1.4[/b]
    JQueryTools: [b]1.0.10[/b]
    CGSmartImage: [b]1.4[/b]
    CGContentUtils: [b]1.2[/b]


Config Information:

    php_memory_limit: [b]50000000[/b]
    process_whole_template: [b]false[/b]
    output_compression: [b]false[/b]
    max_upload_size: [b]64000000[/b]
    default_upload_permission: [b]664[/b]
    url_rewriting: [b]mod_rewrite[/b]
    page_extension: [b].html[/b]
    query_var: [b]page[/b]
    image_manipulation_prog: [b]GD[/b]
    auto_alias_content: [b]true[/b]
    locale: [b]fr_FR.utf-8[/b]
    default_encoding: [b]utf-8[/b]
    admin_encoding: [b]utf-8[/b]
    set_names: [b]true[/b]


Php Information:

    phpversion: [b]5.2.17[/b]
    md5_function: [b]On [/b] (Vrai)
    gd_version: [b]2[/b]
    tempnam_function: [b]On [/b] (Vrai)
    magic_quotes_runtime: [b]Off [/b] (Faux)
    E_STRICT: [b]0[/b]
    memory_limit: [b]50000000[/b]
    max_execution_time: [b]120[/b]
    output_buffering: [b]On [/b]
    safe_mode: [b]Off [/b] (Faux)
    file_uploads: [b]On [/b] (Vrai)
    post_max_size: [b]64M[/b]
    upload_max_filesize: [b]64M[/b]
    session_save_path: [b]/tmp[/b] (1777)
    session_use_cookies: [b]On [/b] (Vrai)
    xml_function: [b]On [/b] (Vrai)


Server Information:

    Server Api: [b]cgi[/b]
    Server Db Type: [b]MySQL (mysql)[/b]
    Server Db Version: [b]5.0.90[/b]


----------------------------------------------

      
avatar
Date: 2011-07-11 18:19
Posted By: Micah Godbolt (micahgodbolt)

I believe the problem is with notag=1 . I was not able to get CGSmartImage to
output just the image path using notag=1. That appears to be what Square is
trying to do in his example.
      
avatar
Date: 2011-07-12 02:52
Posted By: Square (square)

Thank you Micah but it doesn't match with my issue.

I tried both :
<img src="{CGSmartImage src='uploads/images/illustrations/1103-RNCP.jpg'
filter_watermark=1 filter_resize='w,350' filter_grayscale=1}" alt="" />

And :
<img src="{CGSmartImage src='uploads/images/illustrations/1103-RNCP.jpg'
filter_watermark=1 filter_resize='w,350' filter_grayscale=1 notag=1}" alt="" />


RESULT for both code :
<img src="" alt="" />

Same result with notag=0

And now, if I give a WRONG URL to my file, the RESULT is :
<img src="string(121) "Smarty error: Le fichier suivant n&#039;a pas
&eacute;t&eacute; trouv&eacute; : ges/illustrations/1103-RNCP.jpg"
" alt="" />
==> Makes me say that CGSmartImage works, because it checks if the original file
exists and build the thumbnail cache folder, isn't able to output the URL to the
image created.

Makes me say, that to me, CGSmartImage tag doesn't output the URL to the image
created. There's something wrong with this.
      
avatar
Date: 2011-07-12 11:17
Posted By: Robert Campbell (calguy1000)

This just worked perfectly for me. I suggest you check your error logs.

<p>{CGSmartImage src='uploads/ipod/ipod photos 041.jpg' filter_resize='w,350'
filter_grayscale=1 filter_watermark=1}</p>
<p>FOO</p>
<p><img src="{CGSmartImage src='uploads/ipod/ipod photos 042.jpg'
filter_resize='w,350' notag=1}" alt="test"/></p>
      
avatar
Date: 2011-07-12 14:53
Posted By: Micah Godbolt (micahgodbolt)

Yes @Square. When you don't include notag CGSmartImage outputs the entire IMG
tag for you, so no need to wrap it. Just try {CGSmartImage
src='uploads/images/illustrations/1103-RNCP.jpg'
filter_watermark=1 filter_resize='w,350' filter_grayscale=1} by itself.
      
avatar
Date: 2011-07-12 14:57
Posted By: Robert Campbell (calguy1000)

ACTUALLY.  I ran into this today.

It is related to a bug in the {cms_stylesheet} tag (the CMS_STYLESHEET global
variable does not get unset), which i have fixed for CMSMS 1.10 However, I will
endeavor to 'work around' this situation' by checking the call stack and see if
the function is called from within the {cms_stylesheet} tag.

Give me a day.
      
avatar
Date: 2011-07-17 13:28
Posted By: Square (square)

Fixed with 1.4.2 !!

Thanks a lot !
      
Updates

Updated: 2011-07-17 13:28
state: Open => Closed

Updated: 2011-07-10 11:00
resolution_id: => 11