Page 1 of 1

Gallery module -shows pic in Chrome - not in Firefox & IE

Posted: Tue May 09, 2017 9:58 am
by map_1961
I set up a new site and inserted a first picture Gallery.

>>The gallery thumbs and pics are visible in Chrome browser: http://dev.papageienpark-bochum.de/de/p ... n-verkauf/


...but not in Firefox and not in IE. In firefox source i see: "parameter missing..."

We already solved a similar problem month agon:
viewtopic.php?f=7&t=75668&p=330901&hili ... bs#p330901

Thx 4 help

MAP

Re: Gallery module -shows pic in Chrome - not in Firefox & I

Posted: Tue May 09, 2017 10:48 am
by scooper
It looks as if CGSmartImage is complaining that it hasn't got a valid 'src' image. Can you show us what you have in your template?

I don't see anything in Chrome or FF by the way - you might be seeing some cached images there.

Re: Gallery module -shows pic in Chrome - not in Firefox & I

Posted: Tue May 09, 2017 12:06 pm
by map_1961
Thx.
This is the template Lightbox:

Code: Select all

<div class="gallery">
{if !empty($gallerytitle)}<h3>{$gallerytitle}</h3>{/if}
{if !empty($gallerycomment)}<div class="gallerycomment">{$gallerycomment}</div>{/if}
<p>{$imagecount}</p>
<div class="pagenavigation">
{if $pages > 1}
<div class="prevpage">{$prevpage}</div>
<div class="nextpage">{$nextpage}</div>
{/if}
{if !$hideparentlink && !empty($parentlink)}<div class="parentlink">{$parentlink}</div>{/if}
{if $pages > 1}<div class="pagelinks">{$pagelinks}</div>{/if}
</div>

{foreach from=$images item=image}
	<div class="img">
	{if $image->isdir}
		{* this is a subgallery *}
		<a href="{$image->file}" title="{$image->titlename}">
		    {*<img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" />*}
		    <img src="{CGSmartImage src1=$image->thumb|escape:'url'|replace:'%2F':'/' alias1='large' filter_watermark=1 notag=1}" alt="{$image->titlename}" /> 
		</a><br />
		{$image->titlename}
	{else}
		{* this is an image *}
		<a class="group" href="{CGSmartImage src=$image->file alias1='medium' notag=1 filter_watermark=1 noembed=1}" data-title="{$image->titlename}{if !empty($image->comment)} &bull; <em>{$image->comment|strip_tags|escape:'html'}<em>{/if}" data-lightbox="cmsmsgallery{$galleryid}">
		    {*<img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" />*}
		     <img src="{CGSmartImage src1=$root_url src2=$image->file|escape:'url'|replace:'%2F':'/' alias1='gallery_thumb' filter_watermark=0 notag=1}" alt="{$image->titlename}" />

		</a>
	{/if}
	</div>
{/foreach}
<div class="galleryclear">&nbsp;</div>
</div>
Regards and thankx

MAP

Re: Gallery module -shows pic in Chrome - not in Firefox & I

Posted: Tue May 09, 2017 1:24 pm
by scooper
There's quite a lot going on there that I suspect you don't need.
My first suggestion would be to start with a simple version of the CGSmartImage tag. I can't really see any reason to url encode things again and I don't think you should need to supply a value for the root_url; just a single value for src should be ok.

So where you have

Code: Select all

<img src="{CGSmartImage src1=$root_url src2=$image->file|escape:'url'|replace:'%2F':'/' alias1='gallery_thumb' filter_watermark=0 notag=1}" alt="{$image->titlename}" />


just try

Code: Select all

<img src="{CGSmartImage src=$image->file alias1='gallery_thumb' notag=1}" alt="{$image->titlename}" />
which works for me.

Re: Gallery module -shows pic in Chrome - not in Firefox & I

Posted: Tue May 09, 2017 3:26 pm
by map_1961
Thank you scooper.

Id did as you proposed. No i have for all differetn images the same thumb and on click the same image. But after clearing all files at cgsmartimage toolkit > tab General - even this thumbs are gone again.

:-(
this is the code now:

Code: Select all

<div class="gallery">
{if !empty($gallerytitle)}<h3>{$gallerytitle}</h3>{/if}
{if !empty($gallerycomment)}<div class="gallerycomment">{$gallerycomment}</div>{/if}
<p>{$imagecount}</p>
<div class="pagenavigation">
{if $pages > 1}
<div class="prevpage">{$prevpage}</div>
<div class="nextpage">{$nextpage}</div>
{/if}
{if !$hideparentlink && !empty($parentlink)}<div class="parentlink">{$parentlink}</div>{/if}
{if $pages > 1}<div class="pagelinks">{$pagelinks}</div>{/if}
</div>

{foreach from=$images item=image}
	<div class="img">
	{if $image->isdir}
		{* this is a subgallery *}
		<a href="{$image->file}" title="{$image->titlename}">
		    {*<img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" />*}
		    <img src="{CGSmartImage src1=$image->thumb|escape:'url'|replace:'%2F':'/' alias1='large' filter_watermark=1 notag=1}" alt="{$image->titlename}" /> 
		</a><br />
		{$image->titlename}
	{else}
		{* this is an image *}
		<a class="group" href="{CGSmartImage src=$image->file alias1='medium' notag=1 filter_watermark=1 noembed=1}" data-title="{$image->titlename}{if !empty($image->comment)} &bull; <em>{$image->comment|strip_tags|escape:'html'}<em>{/if}" data-lightbox="cmsmsgallery{$galleryid}">
		    {*<img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" />*}
	{*	     <img src="{CGSmartImage src1=$root_url src2=$image->file|escape:'url'|replace:'%2F':'/' alias1='gallery_thumb' filter_watermark=0 notag=1}" alt="{$image->titlename}" /> *}
            <img src="{CGSmartImage src=$image->file alias1='gallery_thumb' notag=1}" alt="{$image->titlename}" />
		</a>
	{/if}
	</div>
{/foreach}
<div class="galleryclear">&nbsp;</div>
</div>

And this is, what firebug shows me in the souce of firefox:

Code: Select all

<a class="group" href="<br /> <b>Notice</b>: Ein erforderlicher Parameter fehlt oder ist ungültig: src in <b>/homepages/16/d184975754/htdocs/papageienpark2/modules/CGSmartImage/action.default.php</b> on line <b>44</b><br />
...and this is the content of line 44 in cgsmartimage/action.default.php:

Code: Select all

  if( !$silent ) trigger_error($outp['error']);

Thx

MAP

[solved]Re: Gallery module -shows pic in Chrome - not in Fir

Posted: Tue May 09, 2017 4:59 pm
by map_1961
Thankx all: i disabled in >>Site Admin >>settings - Global Settings >> Smarty Settings the smarty caching.
Now it works fine!!!

regards

MAP