26

(3 replies, posted in Showkase Support)

When you extract the Showkase zip file, you'll find a file named showkase.robots.txt.
You can open this file in a text editor to read more about it (in the comments at the top of the file).
Here are the full contents of the file.

# robots.txt
#
# A robots.txt file prevents the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these "robots" where not to go on your site,
# you save bandwidth and server resources.
# This file will be ignored unless it is called robots.txt and is in the root of your host.
# You can either rename this file to robots.txt or copy the content to your existing robots.txt
#
# If you have installed Showkase in the root of your host then:
# 1. Copy this file to the web root OR
# 2. If you have an existing robots.txt file add this content to it.
#
# If you have installed Showkase in a subdirectory then:
# 1. Copy this file to the web root OR
# 2. If you have an existing robots.txt file add this content to it.
# 3. Edit the paths so they point to the files you want to disallow
#
# For more information about the robots.txt standard, see:
# http://www.robotstxt.org/wc/robots.html
#
# For syntax checking, see:
# http://www.sxw.org.uk/computing/robots/check.html

User-agent: *
Crawl-delay: 10
Disallow: /_data/
Disallow: /_library/
Disallow: /_showkase/
Disallow: /_smarty/
Disallow: /_themes/
Disallow: /_trash/
Disallow: /_viewers/
Disallow: /admin/
Disallow: /readme.html

By default, the file (once renamed and placed in the correct location) will disallow crawling throughout the Showkase admin area of your web server.
If you want to disallow everything (public pages as well as the Showkase admin), then use the following (instead of the stock code):

User-agent: *
Disallow: /

I hope this helps.

27

(16 replies, posted in Showkase Support)

@Koinelendot

It's a shame that a new version of Showkase has not yet been released with an implementation of the fix above but my code (from this post) is a complete solution to the problem with no known adverse side affects for those experiencing (or not experiencing) the problem.

28

(1 replies, posted in Showkase Support)

Thank you for bringing this to my attention.
I have reported this to the website admin who will hopefully fix it soon.
Thank you.

In the meantime, the best way to check for updated versions is to periodically check out the Version History page.
Sorry for the inconvenience.

29

(6 replies, posted in Showkase Support)

Thank you for trying my suggestions.

I reverted to PHP 8.0 but nothing changed.

This rules out a PHP version problem. (There are no known issues with Showkase v1.7.6 under PHP 8.0.)

2) I switched to Basic Upload and uploaded a small file successfully and got a green triangle. I then clicked the Images tab to delete the test image, but no images were listed.

That's odd but thanks for trying. I can't think of why this might be at the moment but at least we have this information that we can come back to if necessary.

3) I ran the compatibility test successfully just before I installed Showkase

Presumably all tests pass OK?

4) I switched to debug mode but the Status still just says HTTP error. when I hover over the yellow triangle.

I've never encountered this myself. Unfortunately, the 'HTTP error' is most likely being generated by Plupload (the third-party upload module that Showkase uses) and it's rather generic and doesn't really help us to determine the cause of the problem.

5) I tried setting resizing to default but this did not make any difference.

This rules out the PHP 8.1 / 'thumbnail.php' problem (but changing to PHP 8.0 also rules this out).

Here are some more things to check and try:

(1) Make sure that your image filenames do not have any reserved or special characters in them. Try using only alpha-numeric characters (a-z, A-Z, 0-9) in your image filenames.

(2) Are your images rather large (in filesize)? Check your PHP directives post_max_size, upload_max_filesize and memory_limit to make sure that they are not set too low. Please check in with your web host if you are unsure where your PHP directives are set. (They might be set in a 'php.ini' file or you might be able to set them from within your hosting account's online control panel.)
Check out the description of post_max_size in the PHP documentation: https://www.php.net/manual/en/ini.core. … t-max-size
Here's a quote from the docs which might help you set these values:

post_max_size int

Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

The current PHP default values for post_max-size, upload_max_filesize and memory_limit are 8M, 2M and 128M respectively. Your web host might set other values as their own defaults.
Whatever your own current values are, try doubling them all (or even quadrupling them if they seem very low).

(3) Check your hosting account's control panel to see if there are any security modules installed which might be restricting the upload of images. Also, check any '.htaccess' files that you may be using to see if there are any entries there which might be causing problems.

Showkase works out-of-the-box on most web servers without any tweaking. Unfortunately, it appears that your web server might be a little too restrictive (at least at the moment) to allow Showkase to function correctly and fully.
I'll keep my fingers crossed that one of these new suggestions will point you in the right direction and that you will be able to resolve your problem.
As before, please let me know how you get on.
Thank you.

30

(6 replies, posted in Showkase Support)

Is "HTTP error" the only message that appears or is there a more descriptive message which might help to figure out what is causing the problem?
Does it look like a message generated by Showkase (somewhere within the Showkase interface) or perhaps by your web server?
Could you please post a screenshot of the error message here in this thread so that I can see what you are seeing? It might help to determine the cause of the problem. Thank you.

Showkase does not upload images via FTP/SFTP so there are no FTP settings to configure.

Here are a few things to try.

(1) If possible, please try using PHP 8.0 (or a variant of PHP 8.0.x... the latest being 8.0.29 released on 8 June 2023) on your site instead of PHP 8.1 to see if this makes a difference.

(2) Try uploading via the 'Basic upload' method as well as the 'HTML5 upload' method? You can change the upload method via the link in the lower right corner of the upload module.

(3) Try installing and running the Showkase Server Compatibility Test: https://www.showkase.net/support/sktest/
Even if you ran the test prior to installing Showkase, please run it again just now in case your web host has made any changes to your hosting account recently.
If any of the tests fail, then there are troubleshooting tips on the test's support page (link above).
HP version or settings) which might be contributing to your problem.

(4) Also, you could try running Showkase in Debug Mode to see if any more detailed warning or error messages are displayed in the Showkase status bar (which might not be displayed when debug mode is switched off) to help pinpoint the problem.
Open your 'showkase/admin/settings/constants.php' file in a plain text editor and change line 12 from:

define('DEBUG', false);

... to:

define('DEBUG', true);

The line number above refers to the current version of Showkase (v1.7.6).

(5) Finally (for the time being), are you using custom thumbnail or image dimensions? If so, try using the default values to see if this helps.

I realize that these suggestions might not tackle your problem head on and resolve it immediately but they should at least point us in the right direction.
Please let me know how you get on.

31

(11 replies, posted in Showkase Support)

... and 2023.

32

(3 replies, posted in Showkase Support)

I'm glad you've got it working again. Thank you for letting me know.

33

(3 replies, posted in Showkase Support)

I've tried to replicate the problem you reported (by publishing after sorting a ListViewer gallery by 'sort newest first', as seen in your screenshot) but I'm not encountering the error message myself.

First of all, you could try reinstalling Showkase v1.7.6 on top of your existing v1.7.6 installation .
Follow the upgrading instructions (https://showkase.net/support/upgrade/) but with the same version that you are currently using.
This will overwrite all Showkase source files with fresh versions, in case any of your existing source files have somehow become corrupt or gone missing.

Important Note:
You should not lose any custom content (pages or settings) doing this but it would be wise to make a complete backup of your existing site first, just in case anything unexpected should happen and you need to reinstate your original files at a later date.
Also, if you have made manual customizations to any Showkase source files or have used your theme's custom.css or custom.js files, then please note that these will be overwritten when you follow the upgrade process and you'll need a backup in order to reinstate them afterwards.

If this does not help, then in order to try to determine exactly which line of source code is triggering the error message, try running Showkase in debug mode (in case any more descriptive error messages are displayed in the Showkase status bar).
Open your 'showkase/admin/settings/constants.php' file in a plain text editor and change line 12 from:

define('DEBUG', false);

... to:

define('DEBUG', true);

The line number above refers to the current version of Showkase (v1.7.6).

Please let me know what new error messages (if any) are displayed in the Showkase status bar when you try to replicate the problem.

Also, please let me know what version of PHP you are running (in case it is relevant). I have been testing under PHP 8.1.21.

Hopefully this will resolve your problem or at least bring us one step closer to figuring it out.

34

(3 replies, posted in Showkase Support)

Have you tried the fix from this post yet (modifying the thumbnail.php file and uploading it to its original location (in admin/classes/) overwriting the original file)?
https://showkase.net/forum/viewtopic.php?pid=2234#p2234

Was your screenshot taken before or after implementing the fix? (It looks like the problem before the fix.)

I've modified the thumbnail.php file and uploaded it for you here: [Link removed.]
Just click the 'Download' button... no need to have a Box account to download the file.

Upload the file to admin/classes/ within your Showkase installation on your web server (overwriting the original thumbnail.php file there) and this should hopefully resolve your problem.

35

(3 replies, posted in Showkase Support)

I'm sorry to hear that you've run into a problem.
The problem is due to the use of PHP 8.1 or above (specifically, a PHP feature which Showkase makes use of but which was deprecated in PHP 8.1).

I've replied to another user who ran into this problem (relating to thumbnail dimensions) in this forum thread: https://showkase.net/forum/viewtopic.php?id=472

I noted a fix for the problem (which requires modifying a Showkase source file) here: https://showkase.net/forum/viewtopic.php?pid=2234#p2234

I've notified the developers and the fix should be incorporated into the next version of Showkase but I don't know when this might be.
In the meantime, I hope that you are able to implement the fix and that it resolves your issue.
Please let me know how you get on and if I can be of any further assistance.
Thank you and apologies for any inconvenience caused.

36

(12 replies, posted in Showkase Support)

Email received (and reply sent).
Thanks!

37

(12 replies, posted in Showkase Support)

Sorry about that.
Maybe the email link is only visible to admins.
Mail me at Email address removed.

38

(12 replies, posted in Showkase Support)

Sure thing. You'll find my email address just below my username in the column to the left of this post. (You'll need to be logged into the forum see the Email link.)
Let me know the errors and send me your 'layout.tpl' file and I'll take a look. Thanks.

39

(12 replies, posted in Showkase Support)

Every valid web page should have a <head> section but not every web page has a 'footer'.
Showkase pages do, indeed, have a <head> section but they also have a <header> and <footer>.

I expect when Google says that their code should go in the header and footer that the code should be placed at the top and bottom of the web page respectively (i.e. in the <head> section and just before the closing </body> tag at the very end of the web page).

If you need your code to be placed inside Showkase's own <header> and <footer> sections (which not all web pages will have), then you can insert the code just after the opening <header> tag or just before the closing </footer> tag in the layout.tpl file.

I think the <head> section and the bottom of the <body> section would be fine, though.

40

(12 replies, posted in Showkase Support)

If you added the code to any of the HTML pages generated by Showkase, then you'd lose the code each and every time you republished your site (via the 'Publish' button).

However, you could add the code to a particular Showkase source file in order for the code to automatically be added to every HTML page that Showkase generates on publishing the site.

Open up your showkase/_themes/base/pagetypes/layout.tpl file in a plain text editor.
You can then add your code between the <head> ... </head> tags (if the code is to go in the <head> section) or just before the closing </body> tag (if that's where Google is recommending the code to go).

After re-uploading the modified layout.tpl file to its original location (overwriting the old version), your custom code will be included within every HTML file throughout your site each time the site is published (without needing to manually add it to any pages).

41

(12 replies, posted in Showkase Support)

The CMS is "Showkase". (The big 3 CMSs are Drupal, Joomla and WordPress but you're using Showkase.)

42

(3 replies, posted in Showkase Support)

That seems strange...
Dynamic properties were deprecated in PHP 8.2 (as noted here) so you should not be receiving this error message under PHP 8.0 or PHP 8.1.
Could you maybe double-check that the problem happens under PHP 8.0 and PHP 8.1?

The developers are aware of the problem and it should be resolved in the next release (although I do not know when this might be).
In the meantime, the workaround really ought to be to use either PHP 8.0 or PHP 8.1 (before dynamic properties were deprecated) or, indeed, any version of PHP from PHP 5.2.0 up to PHP 8.1.17 so please make sure that your web site is definitely using PHP 8.0 or PHP 8.1 rather than PHP 8.2 and let me know how you get on.
Thank you.

I have two buttons!

Nice! I'm glad you've got the functionality you need.
Thanks for the update.

You're welcome!

After rebuilding my gallery, I have just unzipped them to over write the new versions, and bingo the sort order is restored.

Good thinking! That'll work.

As a matter of interest, your multi-tread explanation does seem to fit. I couldn't replicate the problem on shared hosting today...

Yes, this theory does seem to make sense.

I have no doubt messing about with the showkase directories and content is generally a very bad idea and is frowned upon...

Not frowned upon... just not officially supported.
Having said that, if you really want a button to regenerate only images and don't want to create one yourself (I don't know how many source files would be involved) or wait to see if the developers introduce one, then you could maybe re-purpose the existing 'Rebuild' button to process only images by commenting out the lines of code which deal with regenerating the accompanying text files.

A couple of caveats:
(1) You'd no longer be able to use the 'Rebuild' button for its original purpose/full functionality.
(2) It would work only if no images are added to or removed from the gallery and if all filenames remain exactly the same. (I know you are aware of this. It's worth mentioning again, though, just in case anyone else is reading this.)

With this in mind, if you want to try it out, open your site's admin/commands/advanced.php file in a plain text editor and comment out (or remove) lines 77 to 86 (inclusive) and also lines 88 and 89. You can comment out lines of PHP code by adding // at the beginning, as follows:

// $page->gallery->saveGallery();
// Board::addMessage('Gallery xml file rebuilt');
// $pageSet->setPagesDataImageCount(
    // $pageIndex,
    // $page->getImageCount()
// );
// $pageSet->savePagesData();
// $pageSet->setPagesPref('publishing', 'unpublished');
// $pageSet->savePagesPrefs();
// Board::addMessage('Page data cache updated');
// $page->savePageHtml($pageSet, new Nav($pageFactory, $pageSet), new GalleryIndex($pageSet), new Smarty());
// Board::addMessage('Page html rebuilt');

Just re-upload the file after editing it (to its original location, overwriting the existing file). You might like to make a backup of the original file first (although you could always just extract the stock version of the file from the Showkase zip file if you need it).

This is untested and, being a source code modification, as far as I can take this in my capacity as official support.
I hope it points you in the right direction, though.

Email received. Thank you!

Thank you very much for all the effort you've gone to in documenting this issue.

After some extensive testing, I've been able to reproduce the problem and I've now seen this happen with not only galleries built with Lightroom but also with JuiceboxBuilder and Showkase itself.

It seems to be more noticeable in large galleries (e.g. 100 images or more) and happens more often than not when 'Site -> Customize Viewers -> Juicebox-Pro 1.5.1 -> Edit -> Pro Viewer Options -> Multi-size Images (Pro) -> Medium image resize' is selected (in conjunction with a change to 'Max width' and/or 'Max height').

Being that the image order after each 'Rebuild' seems random and that it seems to be more noticeable in large galleries (where there are a lot of images to process), it still looks like a result of multi-threading to me (with a lot of images being processed concurrently and not always finishing in the same order) but at least I've now got enough information to log a bug report with the developers (which I've just done).

Even if multi-threading is at the root of the problem, it would almost certainly be faster than sequential processing of images so it's likely to remain. Maybe the answer would be to re-order the images (perhaps to a default setting, e.g. filename order) after each rebuild which would be preferable to a random order. I'll leave it in the hands of the developers.

I've been trying to reproduce the problem you've described (rebuilding the gallery results in a random image order) but I've been unable to (on an Apache server).

I imported a Juicebox-Pro gallery with a custom image order and Showkase successfully imported the gallery and retained the custom image order and image titles and captions.

An initial 'Pages -> Edit Page -> Advanced -> Rebuild' rebuilt the gallery and changed the image order (to filename order) but retained image titles and captions.
All subsequent 'Pages -> Edit Page -> Advanced -> Rebuild' actions did not change anything at all.

I see your screenshots and don't doubt what you are experiencing but I don't know what's causing it.
I guess we're both using the same version of Showkase (v1.7.6) and you mentioned that you've seen the problem on an Apache server (which I was also using for testing) so other variables are the PHP installation/settings and the import gallery.

The import gallery shouldn't make a difference but if you like, you could send me the gallery (zip the gallery, upload the zip file somewhere and provide a link) and I'll try rebuilding it several times to see what happens. We should then perhaps be able to eliminate this from the equation (which would leave just PHP installation/settings as the main difference between your setup and mine).

My initial thought (regarding multi-threading) could still be possible but it's really difficult to troubleshoot an issue I can't reproduce.
I hope you can work around it.

It would really great if you could produce a 'script' that just regenerates the images.

Thank you for posting your request in the Feature Requests thread. I'm not the author of Showkase but the your request will definitely be seen by the developers over there.

48

(3 replies, posted in Showkase Support)

You're welcome!

49

(3 replies, posted in Showkase Support)

To add images to any existing gallery page:

(1) Edit the gallery page from the 'Pages' tab.
(2) Go to the 'Upload' tab.
(3) Drag and drop your new images into the upload module (in HTML 5 mode).
(4) Click the 'Start Upload' button and wait for the images to finish uploading.
(5) Click 'Publish' (or add captions on the 'Images' tab or sort the images on the 'Sort' tab first if you like).

(The Library is really just for individual images that you might want to use for a site logo or add to a Basic page.)

I hope that helps.

Thanks for the detailed description and screenshots.
So, in a nutshell, the issue is 'Pages -> Edit Page -> Advanced -> Rebuild' changes the images order (to a different order each time).

Here's my best guess at what's going on...

It certainly seems odd that a random image order would be obtained each time the gallery is rebuilt.
There's definitely no forced randomization going on (as far as I know) so my best guess is that the new image generation may be a multi-threaded process on the web server and Showkase adds each image to the gallery when its image generation is completed.
Multi-threading would certainly get the job done faster than a one-by-one sequential process and you can always sort the images afterwards on the Sort tab.
I don't know for sure if that's what's going on but it would be a possible explanation.

Incidentally, I'm pretty sure rebuilding a gallery was intended as a repair process (e.g. to reconstruct a corrupt XML file) rather than part of a gallery's import procedure.

You seem to have a good grasp of how Showkase works, though, so I hope you can find the workflow that works best for you.