Here is my gallery - It currently contains one item (although for testing and styling, it did include up to 4 items, since deleted).

Click on it to get the lightbox. All good.

Click on the image in the lightbox - end up on the detail page:

Notice the "Item 4 of 4" at the top right. It still thinks there are other images in the gallery, even though they have been removed and deleted from the system.

I've cleared cache, made sure all the images are deleted, etc. Any ideas for how to get this to appear correctly?




Moloc’s picture

Have you patched media_gallery to be compatible with media 2.x? If you are using media 2.x and delete a image, it does not get automatically removed from the media_gallery. So this could be your issue.

barbbar’s picture

I'm using Media 7.x-1.2 - is there a patch for that as well? Or is something else going on?

Moloc’s picture

Media 7.x-1.2 does not allow to delete an image, if it is in use (for example in a media_gallery). So we cannot create a patch for that, as this cannot happen.

How were you able to delete these images?

barbbar’s picture

Ah - good point. I should have made a clarification update.

The initial info is no longer accurate - we did an interim fix with some javascript to make it only page through the correct set of images so we could get closer to launch. I'm looking for a fix so we can remove the JS.

I'm not so worried about deleting images - just that the "1 of 4" is accurate for the active images.


Moloc’s picture

Status: Active » Postponed (maintainer needs more info)

Were you able to solve the issue?

You created a gallery with 4 images. You deleted 3 of them (how?). Now you have a gallery with one image, but the text says, that the gallery contains 4 images? (Can you move to the other images using prev/next button?)
How were you able to fix this issue with javascript?

You need to give us more information. Maybe how we can reproduce it. Otherwise we will not be able to work on this issue.