Hi all,
since recently (maybe related to update but no way to verify) I have run into a strange issue in newly uploaded galleries. I could trace it back to the {strip} command.
Examples:
* Working: http://www.feuster.com/piwigo/picture?/ … is_italien
* Not working: http://www.feuster.com/piwigo/picture?/ … is_italien
What am I doing? I have a local version of picture_content.tpl that checks the current size of the picture to align the prev/next cursors accordingly. For this I have in my picture_content.tpl:
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip} {assign var='size' value=$derivative->get_size()} <map name="map{$derivative->get_type()}"> {if isset($previous)} <area {if $current.selected_derivative->get_type()==$derivative->get_type()}data-class="prevImage"{/if} shape=rect coords="0,0,{($size[0]/4)|@intval},{$size[1]}" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}" alt="{$previous.TITLE_ESC}"> {/if} {* TF, 20160408: no more up arrow since we don't have a categorry page anymore... <area {if $current.selected_derivative->get_type()==$derivative->get_type()}data-class="upImage"{/if} shape=rect coords="{($size[0]/4)|@intval},0,{($size[0]/1.34)|@intval},{($size[1]/4)|@intval}" href="{$U_UP}" title="{'Thumbnails'|@translate}" alt="{'Thumbnails'|@translate}"> *} {if isset($next)} <area {if $current.selected_derivative->get_type()==$derivative->get_type()}data-class="nextImage"{/if} shape=rect coords="{($size[0]/1.33)|@intval},0,{$size[0]},{$size[1]}" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE_ESC}" alt="{$next.TITLE_ESC}"> {/if} </map> {/strip}{/foreach}
to iterate over all derivatives and add "<map>...</map>" for all available sizes.
When working correctly, this gives
<map name="mapmedium"><area data-class="prevImage" shape=rect coords="0,0,198,501" href="picture?/12716/category/950-klagenfurt_bis_italien" title="Previous : 20190916 121429" alt="20190916 121429"><area data-class="nextImage" shape=rect coords="595,0,792,501" href="picture?/12758/category/950-klagenfurt_bis_italien" title="Next : IMG 0459 stitch" alt="IMG 0459 stitch"></map>
for the shown derivative. In the few cases that fail since the last upload I only get
area data-class="nextImage" shapelass="prevImage" shapemapmedium"><area data-class="prevImage" shape=rect coords="0,0,198,497" href="picture?/12751/category/950-klagenfurt_bis_italien" title="Previous : IMG 0422 enfused" alt="IMG 0422 enfused"><area data-class="nextImage" shape=rect coords="595,0,792,497" href="picture?/12753/category/950-klagenfurt_bis_italien" title="Next : IMG 0430" alt="IMG 0430"></map>
which is a somehow twisted version of the correct output.
This only happens when I use the {strip} command, without it the code is generated correctly.
Thanks!
Thomas
Piwigo 2.10.1 Check for upgrade
Operating system: Linux
PHP: 7.3.10 (Show info) [2019-10-22 20:55:51]
MySQL: 5.5.60-0+deb7u1-log [2019-10-22 20:55:51]
Graphics Library: External ImageMagick 6.8.9-9
Offline