We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question, Problem, Error

Adding images from new Assets fails repeatedly (a Bug?)

I'm using the following template to create a lightbox 2 gallery with the first image showing as the thumbnail.

When I get to add the 6th or 7th image in the control panel all the images in the list revert to using the same (first thumbnail) image

And I have to start over again. At one point "all" the repeated templates reverted to using this first image in the template. Would this be when old unlinked assets are removed?

Arrgghh! Wasted about 3 hours today trying to work out why. I this a bug or something wrong with the template?

Using 2.5.3 this was also happening in 2.5.2

 <perch:help><p>Images added here will create series of thumbnail images that popup as a large image</p></perch:help>
<div class="galleryblock">
<h3 class="galleryheading"><perch:content id="galleryname" type="text" label="Gallery Name" html="false" required="true" title="true" help="Name this gallery (keep this short!)" /></h3>

<ul class="minigallery">    
<li class="gallerythumb">
    <a href="<perch:content id="image" type="image" label="Cover Image" width="800" height="600" />" class="imagepoppuplink" data-lightbox="<perch:content id="galleryname" type="text" words="1" />" title="(<perch:content id="galleryname" type="text" />) <perch:content id="title" label="Description" type="text"  help="Describe this image (appears under the large pop-up image)" />" >
        <img class="imgthumb" src="<perch:content id="image" type="image" label="Image" width="160" height="100" crop="true" />" alt="<perch:content id="title" />" >
<perch:repeater id="images" label="Images" scope-parent="true"><li class="gallerythumb hidethumb">
    <a href="<perch:content id="image" type="image" label="Image" width="800" height="600" />" class="imagepoppuplink" data-lightbox="<perch:content id="parent.galleryname" type="text" words="1" />" title="(<perch:content id="parent.galleryname" type="text" />) <perch:content id="title" label="Description" type="text"  help="Describe this image for the gallery text" />" >
        <img src="<perch:content id="image" type="image" label="Image" width="160" height="100" crop="true" />" alt="<perch:content id="title" />" >
David Owen

David Owen 0 points

  • 5 years ago

I found one image that was (is) too big 6mb and probably ran out of memory when trying to create it's images (either not fully uploaded or too big). I've made all images smaller (under 2mb) and re-upload a batch just for these Light boxes. And is holding up so far.

Could this be the reason why? Some off the oddities were seeing the login form inside the assets panel.

It's very worrying if this is potentially so fragile. It could crash without any warning and corrupting a whole set of repeating galleries creating massive re-working.

A client will break this and unwittingly upload a 20MB image his 20+ image gallery falls down totally.

Is there any way of limiting file size gracefully? To be fair I did not try the "undo" would that have been any help in this intance?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't follow how a failed upload would affect the repeater. Could you elaborate?

Undo is usually the way to go.

See this before after screenshot...


  1. Add/edit 3rd/4th image
  2. Asset panel opens
  3. Select or upload a rouge image (I think too big or perhaps already corrupted in some way) (The app might crash at this point - not always noticeable)
  4. Select the image to use - Assets panel closes
  5. The lower images are replaced with the first "cover" image.

Not even saved at this point. The whole gallery is corrupted and have to start over. Note it's not just the image it's all the information with it that's duplicated.

I originally had "edit" all on one page. That brought down multiple galleries in the same fashion. I'm not doing that now as it's too far to recover from when it goes wrong again.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

I don't understand what you mean by "crashed". Is your browser crashing? I can see you are seeing some strange behaviour but I'm not sure what happens between step 3 and 4, do you have to restart your browser?

Sorry crash is the wrong word. I'm assuming Perch ran out of memory it seemed I could recreate the problem with one uploaded larger image (I'm guessing). The browser was ok. Occasionally when working (selecting > use image in assets) on these galleries Perch appeared to log me out with oddly the login form appearing in the asset window. It's all a bit weird.

This was first noticed when after leaving the development site over the weekend until this morning all the galleries reverted to use the first image. All four galleries were effected.

Not all the images in Assets were there presumably cleared out not being linked any more. I shall find out in 24 hours if the same will happen again. I found two images which were perhaps oversize and using smaller sizes. Again I'm pulling at straws as to why this is happening. I'm assuming either the template, the images or a bug?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can you show us your Diagnostics Report please.


Perch is up to date
PHP 5.5.9 is up to date
MySQL 5.5.33 is up to date
Image processing available

Perch: 2.5.3, PHP: 5.5.9, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.5.3), assets (2.5.3), perch_blog (4.1)
App runtimes: <?php $apps_list = array( 'content','perch_blog', );
PERCH_PATH: /home/sites/demo-one.co.uk/public_html/vacformdev/cms
PERCH_CORE: /home/sites/demo-one.co.uk/public_html/vacformdev/cms/core
PERCH_RESFILEPATH: /home/sites/demo-one.co.uk/public_html/vacformdev/cms/resources
Image manipulation: GD (image sharpening disabled, #66714)
PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M
Resource folder writeable: Yes
HTTP_HOST: vacformdev.demo-one.co.uk
DOCUMENT_ROOT: /home/sites/demo-one.co.uk/public_html/vacformdev/
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

Could this be the template (above) at fault? Here's a screen recording of the behaviour


See how when an image is replaced in the gallery others default to a single image?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm unable to make this fail, so I'm not sure what to suggest.

I think... it might be the template. Using a different ID for the repeater and different image ID inside the repeater and I can't break it, so far.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Good to know.