1 (edited by paitken 2020-12-26 20:50:53)

Topic: Gallery shows wrong photos

I revised one of my galleries, adding some photos, removing others, and changing the order. After publishing, the gallery shows the old photos in the old order. I have done all I can think of, including deleting all the files locally and remotely and regenerating everything from scratch. When I look in config.xml the proper photos are listed in the proper order. What can be causing this?

Re: Gallery shows wrong photos

It sounds like a caching problem: either client side (in your browser) or server side.
Caching can be very useful but it can also be a hindrance when developing a web site.

First of all, try completely clearing your browser's cache before reloading your gallery's web page to ensure that your browser is using the latest versions of all the files fresh from your web server (instead of older, cached versions).
Alternatively, try viewing your gallery's web page using a different browser (one that you have not used to view your gallery's web page before): Chrome, Edge, Firefox, Opera or Safari.

There is a chance that your web host uses server-side caching and even though you upload new files via FTP, older versions of those file could still be served to browsers for a certain amount of time.

I have an account with a web host that uses Varnish server caching. After I upload a new version of a file to my web server, the new version is not seen (and the old version is still served) for about 20 minutes afterwards. For this reason, I have Varnish disabled.

Ask your web host if they have server-side caching enabled on your hosting account and, if so, ask if they could disable it.

If neither of the suggestions above help, then please post the link to your gallery's web page and let me know what you see and what you expect to see.
I'll take a look myself, let you know what I see and hopefully figure out what the problem is.
Thank you.

Re: Gallery shows wrong photos

Incidentally, if you are just checking your gallery's 'config.xml' file before you upload the gallery to your website, make sure that your FTP program is set to overwrite existing files, otherwise your FTP program may see that there is a pre-existing 'config.xml' file in on your web server and just leave it there (in preference to overwriting it with the new version).

Also, double-check the 'config.xml' file after you upload it to your web site by opening the file directly from the web server in a browser.