[Solved] CGSmartImage 1.10.8 broke http

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

[Solved] CGSmartImage 1.10.8 broke http

Post by luya »

I have upgrade CMSMS to 1.1.15 and CGSmartImagr is 1.10.8 which curently broke some section:

Code: Select all

Warning: file_get_contents(http://cwmag.ca/stg/uploads/news/id2/) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/content/31/9985931/html/stg/modules/CGSmartImage/lib/class.cgsi_utils.php on line 365

Notice: Could not find a file at: http://cwmag.ca/stg/uploads/news/id2/ in /home/content/31/9985931/html/stg/modules/CGSmartImage/action.default.php on line 44
Are there a solutions to address the issues?
Last edited by luya on Tue Apr 16, 2013 8:05 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage 1.10.8 broke http

Post by calguy1000 »

How are you calling CGSmartImage?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: CGSmartImage 1.10.8 broke http

Post by luya »

Here is the code based on previous suggestion using custom upload file:

Code: Select all

{CGSmartImage filter_croptofit="296,180,c" noembed='0' quality='65' src="{$entry->file_location}/{$entry->fieldsbyname.Images->value}" alt="{$entry->title}"}
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage 1.10.8 broke http

Post by calguy1000 »

Looks like: {$entry->fieldsbyname.Images->value} is empty.
and you prolly should check it before calling CGSmartImage.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: CGSmartImage 1.10.8 broke http

Post by luya »

You are right,
{$entry->fieldsbyname.Images->value} was empty in one of fields. That error did not occur on CGSmartImage 1.10.7. I also found out "suppress error" from General Tab was set to "No" which solved the second error but no the first one.
Perhaps a conditional statement should do the trick but I am not very familiar with smarty. :(
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: CGSmartImage 1.10.8 broke http

Post by calguy1000 »

Code: Select all

{if $entry->fieldsbyname.Images->value != ''}
  {CGSmartImage filter_croptofit="296,180,c" noembed='0' quality='65' src="{$entry->file_location}/{$entry->fieldsbyname.Images->value}" alt="{$entry->title}"}
{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
luya
Forum Members
Forum Members
Posts: 91
Joined: Wed Jan 23, 2013 1:34 am

Re: CGSmartImage 1.10.8 broke http

Post by luya »

That worked, thanks calguy1000! ;D
Post Reply

Return to “Modules/Add-Ons”