Invalid album instantiation

My debug log is running full with errors like this:
{15496:Wed, 26 May 2021 00:17:20 GMT} Zenphoto v1.5.7 USER ERROR: Invalid album instantiation: 2007/2007_Madagaskar/01%20Tana does not exist. in /var/www/alben/zp-core/class-album.php on line 1297 trigger_error called from Album->_albumCheck (class-album.php [1297]) from Album->__construct (class-album.php [1267]) from newAlbum (class-album.php [26]) from full-image.php [45]
All referenced folder names have in common to include a space in the name (%20). Any Idea beside renaming the folders to fix this? I don't expect the space character to be a restricted one.

Thanks Jan

Comments

  • acrylian Administrator, Developer
    edited July 26

    So the albums actually do exists with those spaces? Then you should rename them to avoid hassle. Since the folder names like filenames also are used in the URL you should generally avoid spaces and special chars because they are looking bad being encoded and also may cause all sorts of issues. Spaces should be replaced by dashes.

    You can use the seo cleanup plugin to do so. Note: If the URLs are important for you regarding SEO you may need to add redirections using the redirector plugin for all albums as otherwise the URLs break.

    Please consider to upgrade to 1.5.9 ;-)

  • sbillard Member

    While the suggestion to rename the folder is valid for SEO reasons albums with spaces in the folder name should be working: https://sbillard.org/50th Anniversary, San Diego/

    From the error message I would guess that the album link is being doubly URL encoded. The space is represented in the URL as %20, but that should have been converted to a space when by the server processing of the requested link.

  • acrylian Administrator, Developer

    It seems to be server/system dependent. On my localhost it does not work as well but it does on our own server, with encoded spaces and without :

  • wessjan Member

    I've renamed the folders and adjusted the DB. The errors are gone. Thanks.

  • acrylian Administrator, Developer

    Great, save you from lot of unnecessary hassle even if it "should" work.

Sign In or Register to comment.