Topic: Rogue Galleries and mystery reorder of images

I've been using the lightroom plugin which is very useful.

I have noticed that some strange rogue galleries have spontaneously appeared in the root directory (see attached screen shot or not, seems that images are switched off and I can't upload a file as am attachment as is possible in Juicebox forum).

Thats a file list, you see the gallery-3 etc. Just appeared by themselves.
viewers admin cgi-bin chelsea desert-mountain-t.
galleries gallery gallery-2
gallery-6 general-melonry ibcore mfc-chicken more-melonry music-2

after a site rebuild some of my galleries image order changed for no apparent reason, which was frustrating.

Any idea why these two things have happened.

I deleted the rogue galleries, and some more appeared.


Re: Rogue Galleries and mystery reorder of images

I'm sorry to hear about your troubles with Showkase and that you were unable to upload a screenshot. (The best thing to do would be to just upload the screenshot elsewhere (e.g. Dropbox, Google Drive, your website) and provide a link.)

I think a mismatch between Showkase's page records and the actual contents in the Showkase directory is the most likely cause of this.

Have you ever deleted any galleries manually or renamed any gallery folders (via FTP) rather than using the Showkase interface?
If so, then Showkase would expect the gallery folders to be present (the galleries would still be listed in Showkase's page records) and might try to recreate them on a subsequent publish.

Also, if you have ever uploaded a gallery folder (via FTP) to the Showkase directory to import into that particular Showkase site, then have you ever forgotten to delete the gallery folder afterwards?

I'm not sure what else would cause such a problem.

When importing galleries, I'd recommend not uploading them to the Showkase directory to which they will be imported. Showkase would be forced to rename the imported gallery folder (as the original gallery folder would be there during import) and it might be confusing, at a glance, to know which folders within the Showkase directory are actually part of the Showkase site and which are not.
It's a good idea not to modify anything within the Showkase folder manually (via FTP)
I'm not suggesting that you are doing this (I simply don't know) but it's just a general tip for anyone reading this.

If you still need to sort things out, then first of all, I'd recommend taking a complete backup of your site, just in case anything further goes wrong and you need to reinstate your current files at a later date.

With a full backup in hand, try sorting the pages out on the 'Pages' tab (deleting whatever galleries you do not want) and then go to 'System -> Repairs -> Repair' to rebuild the page records.

If this does not help, then you could perhaps create a new Showkase site (in a separate directory from your original site) and then import the pages/galleries that you need from your original site (via 'Site -> Import').

You can retain the Showkase settings from your original site by manually copying the following files and folders from your original site to your new site (overwriting the default versions which will be in place after a fresh install).

  • _data/sitedata (folder)

  • _data/themedata (folder)

  • _data/pagesprefs.txt (file)

  • _data/theme.txt (file)

Do not copy the _data/pagesdata.txt file though, as this lists the pages present in each site (which will be different after a fresh install).

If you use a custom logo via an image stored in the library, for example, then you might also like to copy the _library folder from your original site to your new site.

If you have modified any Showakse source files or used the custom.css or custom.js files, then please remember that you will need to reinstate your customized files after a fresh install.

... after a site rebuild some of my galleries image order changed for no apparent reason...

I really do not know what might have caused this. A gallery's image order is stored in the gallery's 'config.xml' file and the file would have to be modified to change the image order. What I think might be happening is that the gallery you are looking at is one of the new phantom galleries which Showkase has recreated (from a missing or renamed gallery folder?) rather than the original gallery from which the phantom gallery was  based. Showkase might just see a folder of images and create the phantom gallery with no knowledge of the original gallery's image order.
It's just a guess (again, based on the assumption that a gallery folder might have been renamed or deleted manually via FTP).

I know this doesn't definitively pinpoint the cause of the problem or provide a quick and easy solution but I hope that my notes are at least able to shed some light on what might be happening.

3 (edited by petax 2023-03-19 10:19:49)

Re: Rogue Galleries and mystery reorder of images

Thanks Steve for your exhaustive reply, you are a champion.

I have messed around a little in ftp and the sever file manager, this might explain how I have caused this issue. I've not uploaded via FTP by hand, only using the Lightroom plugin. But I have deleted the odd gallery that I uploaded and did not want, as I had made changes. This would be prior to importing them, so I kind of assumed that it would make no difference.

As for the weird resort of my galleries. It happened after I repaired the entire entire site, what was odd is that one gallery 'got better' and another didn't. It's not a big deal, I just re-uploaded from Lightroom, and order was restored. I will look carefully if it happens again.

I did do a reinstall as well.

As for images in posts here on the forum, I tried that. I am more than familiar with bbcode etc. The forum has no links allowed in posts, this seems to include IMG tags, I uploaded the screen shot to one of my servers, but to no avail. You may want to look at that, as only you have the keys.

As always thank you for your kind help.

(Edit: comment moved to correct topic)

Re: Rogue Galleries and mystery reorder of images

I still don't know the exact cause of your problems but it appears that you've been able to sort things out which is good.

Avoiding any manual edits to the Showkase directory (making sure everything is done within the Showkase interface) should prevent things from breaking.

Also, when importing a gallery, upload the gallery folder to somewhere outside the Showkase directory if possible.
If this is not possible (e.g. your Showkase directory is your web server root directory), then create an 'import' folder (use a name that Showkase is not already using for a page folder name), upload your gallery folder to this new folder and import the gallery from there. This will allow Showkase to give the imported gallery folder the same name as the original gallery folder (as the two gallery folders will not be in the same directory) which might be less confusing than seeing a lot of folders with -2, -3, etc. suffixes. Also, it'll not matter whether or not you delete gallery folders after import as they'll all be in the 'import' folder which Showkase will have no knowledge about.

Incidentally, I've installed the Attachment extension to the forum so you should be able to add images to posts now.

I hope all goes well with the fixup.

5 (edited by petax 2023-03-20 01:00:33)

Re: Rogue Galleries and mystery reorder of images

Thanks Steve

I set up a directory showKase_upload one level up (I have numerous sites on my server) that worked a treat, good idea.

For those interested: An example path for uploads a level up  "../showKase_upload" then scan.

Choose that directory path for uploading from Lightroom, creating an appropriately named subfolder.