I can't see the error you noted in initial post. I can see the following though:
As I noted in my first reply, you are using
PRELOAD ENTIRE WEBSITE feature. This is a very powerful feature that will make your website FLY (in terms of speed). However, it requires you to
ALWAYS recreate site object after every change you make. Failure to recreate site object, means the site object will contain OLD pages, which will appear when you navigate between pages in browser. It is probably a good idea to DISABLE this feature while you are developing/updating, and instead enable it (and create site object!) once the website is ready for deployment. I also recommend you to read up on the HELP for Settings > Advanced > Preload Entire Website. If you do not understand this feature and/or forget to recreate site object after making changes, it will certainly cause a great deal of frustration.
X3 Panel Help wrote:Preload Site Object
What does it do?
When this setting is enabled, your website will preload a data-object containing all pages of your website. The loading of this data-object occurs as an invisible process, after first page is loaded and displaying to the visitor. Once the site Object is loaded into the visitors browser, navigating to other pages on the website are instantaneous. This makes your website seems super-fast, and it requires less loading of individual pages.
* The Site Object only contains page text, so images and other assets will load as usual once each page displays.
Should I be using it?
Preloading the site object is a very powerful feature, but it is not beneficial in all cases. If your website has hundreds of pages, each with loads of images, it will become too heavy and counter-productive. If you have a relatively light website (say less than 40 pages), without excessive amounts of images in each folder, then you can try it.
Heavy Process
As you will likely experience, creating the site object is a very heavy process, that could take a long time to process on your server, or even time-out. The reason for this, is because the script needs to loop through- and create all pages in a single process. The time required for processing, depends entirely on the power of your server, and the depth of your content (pages and images). If you get a timeout when clicking the button, it is a clear indication that you shouldn't be using this feature. If your server manages to create the site object, it will get cached, and will load relativey fast for visitors.
Instructions
If you want to use this feature, you will need to need to enable the preload site object from your main settings. Then, each time you make changes to your gallery, you will need to click the "create" button below to refresh the site object. You don't need to create the site object after every change you make, only when you are done editing and want to "publish" the website.
* You don't need to refresh the site object if you are testing individual pages. The site object is only used when navigating between pages, and does not apply to the page you start from.