longhairfish wrote:The problems have been going on for a year.
Well, that's not the only problem that's not fixed since once upon a time. You know that by yourself.
I have the impression that it always gets the image that is one before in the gallery. Except - of course - if you click the first one. That means your counter is one number short, when you click on an image in the gallery.
If I should guess I would say somewhere in the routine that gets the image from the database there is a subtraction of 1 from the counter.
You can see that pagination of the images when you browse through the images after opening one. The first image is "#0", the second is "#1" and so on. And here's the problem.
If you use ROW_NUMBER() in SQL it begins to count at 1. If you use LIMIT or OFFSET it begins to count at 0. And some highbrow seems to have "corrected" or "syncronize" that counting from ROW_NUMBER manually by subtracting 1 because he thought that it should fit with the other counting or the pagination. That would exactly cause this problem. The search will get the predecessor of the dataset it wanted to get. And of course it works with the first dataset because dataset #-1 doesn't exist and is caught by troubleshoot routines.
Perhaps you can give that information to your IT guys.