[11-Mar-2018 07:54:05 Europe/Amsterdam] PHP Notice: Kan geen bestand vinden in: NAN in /home/efacti/public_html/uisge-beatha.eu/www/modules/CGSmartImage/action.default.php on line 44
[11-Mar-2018 07:54:05 Europe/Amsterdam] PHP Notice: Kan geen bestand vinden in: NAN in /home/efacti/public_html/uisge-beatha.eu/www/modules/CGSmartImage/action.default.php on line 44
[11-Mar-2018 07:54:05 Europe/Amsterdam] PHP Notice: Kan geen bestand vinden in: NAN in /home/efacti/public_html/uisge-beatha.eu/www/modules/CGSmartImage/action.default.php on line 44
[11-Mar-2018 07:54:05 Europe/Amsterdam] PHP Notice: Kan geen bestand vinden in: NAN in /home/efacti/public_html/uisge-beatha.eu/www/modules/CGSmartImage/action.default.php on line 44
What does this CGsmartImage error in log mean?
What does this CGsmartImage error in log mean?
I get tons of error messages in de Admin log, related to CGSmartImage that it can't find a file in: NAN. Any help to identify the root cause would be highly appreciated.
Re: What does this CGsmartImage error in log mean?
NaN means is not a number in PHP.
So probably, the variable you give to your CGSmartyImage tag gives a "NaN" return.
It would help to have some more information on your cmsms install and maybe template code.
So probably, the variable you give to your CGSmartyImage tag gives a "NaN" return.
It would help to have some more information on your cmsms install and maybe template code.
Kind regards,
HarmO
HarmO
Re: What does this CGsmartImage error in log mean?
Thanks HarmO.
I use CGSI on various places on my site. A little more explaination on where the error was found in the log would help me to know where to look.
Is there any other way to find the cause of the error?
I use CGSI on various places on my site. A little more explaination on where the error was found in the log would help me to know where to look.
Is there any other way to find the cause of the error?
Re: What does this CGsmartImage error in log mean?
So you have no actual error on your website?
Kind regards,
HarmO
HarmO
Re: What does this CGsmartImage error in log mean?
No, the front-end of the site doesn't show any errors, and all photo's where I use CGSI, are working as expected. The error log on the server shows:
[11-Mar-2018 07:54:05 Europe/Amsterdam] PHP Notice: Kan geen bestand vinden in: NAN in /home/efacti/public_html/uisge-beatha.eu/www/modules/CGSmartImage/action.default.php on line 44
Re: What does this CGsmartImage error in log mean?
Have you tryed the debug mode
https://docs.cmsmadesimple.org/troubles ... debug-mode
https://docs.cmsmadesimple.org/troubles ... debug-mode
Kind regards,
HarmO
HarmO
Re: What does this CGsmartImage error in log mean?
Didn't try that one, but I managed to find it based on the number of NAN-error shown on a blog article page I concluded it must be the 'fotoalbum'-template.
I was using {root_url}/ in the src= link. Removing {root_url}/ solved it.
Thanks for pointing me to switch on debug mode.
I was using {root_url}/ in the src= link. Removing {root_url}/ solved it.
Thanks for pointing me to switch on debug mode.
Code: Select all
<div style="clear:both"></div>{* make sure heading is alignemt to the left *}
{* clean up parameters |replace:' ':'%20' *}
{assign var='album_no_spaces' value=str_replace(' ', ' ', "uploads/images/Gallery/{$gcb_params.album}")}
{assign var='foto_no_spaces' value=str_replace(' ', ' ', {$gcb_params.foto})}
{assign var="first_photo" value="uploads/images/Gallery/{$gcb_params.album}/{$gcb_params.foto}.jpg"}
<h4><span class="icon-camera"></span> Meer foto's in het album</h4>
{assign var='files' value="{$album_no_spaces}/*.jpg"|glob}
{if count($files)}
<div class="floatbox" data-fb-options="doSlideshow:true group:`cgblog` caption:`href` header:`#socialmediashare1` preloadLimit:2">
<a href="{$first_photo|cms_escape:'urlpathinfo'}">{CGSmartImage src="{$first_photo}" width="150" alt="Uisge Beatha, Zeilen" noresponsive=1}</a>
{foreach from=$files item='file'}
{if !$file|contains:"thumb_"}
<a href="{$file|cms_escape:'urlpathinfo'}">{CGSmartImage src={$image->thumb} alt="{$image->titlename|substr:0:-4}" noresponsive=1}</a>
{/if}
{/foreach}
</div><p> {* needed to for come a warning on W3C validation *}
{/if}Re: What does this CGsmartImage error in log mean?
Code: Select all
{CGSmartImage src="{$first_photo}" width="150" alt="Uisge Beatha, Zeilen" noresponsive=1}
...
{CGSmartImage src={$image->thumb} alt="{$image->titlename|substr:0:-4}" noresponsive=1}Code: Select all
{CGSmartImage src=$first_photo width="150" alt="Uisge Beatha, Zeilen" noresponsive=1}
...
{CGSmartImage src=$image->thumb alt=$image->titlename|substr:0:-4 noresponsive=1}Code: Select all
{assign var='foto_no_spaces' value=str_replace(' ', ' ', {$gcb_params.foto})}
{assign var="first_photo" value="uploads/images/Gallery/{$gcb_params.album}/{$gcb_params.foto}.jpg"}Re: What does this CGsmartImage error in log mean?
Thanks, I'll give it a try. Not always sure when to use or not use brackets.velden wrote:I think it's possible to make it work like this (a little less quotes and brackets, might make it more efficient)Code: Select all
{CGSmartImage src="{$first_photo}" width="150" alt="Uisge Beatha, Zeilen" noresponsive=1} ... {CGSmartImage src={$image->thumb} alt="{$image->titlename|substr:0:-4}" noresponsive=1}
Code: Select all
{CGSmartImage src=$first_photo width="150" alt="Uisge Beatha, Zeilen" noresponsive=1} ... {CGSmartImage src=$image->thumb alt=$image->titlename|substr:0:-4 noresponsive=1}
The first line of code is obsolete. I'm not making use of the Gallery module. The second line of code is meant to point to the right folder location in order to for come to pass lenghty parameters.velden wrote:Further I think the Gallery module has an option to assign one picture as the 'album cover' (per gallery). Which maybe better to use than the code below. Though I don't know exactly what the intentions are.
Code: Select all
{assign var='foto_no_spaces' value=str_replace(' ', ' ', {$gcb_params.foto})} {assign var="first_photo" value="uploads/images/Gallery/{$gcb_params.album}/{$gcb_params.foto}.jpg"}


