After upgrading to 1.5 all cache files for zpArdoise are being regenerated

tplowe56 Member
edited July 7 in Themes

After upgrading to 1.5 all cache files for zpArdoise are being regenerated. I have hundreds of albums with existing image sizes still intact but after upgrading new cache files are generated for all thumbnails and other image sizes. Not alteration has been done to zpArdoise theme before or after upgrade.

Comments

  • acrylian Administrator
    edited July 7

    The topic title is a bit misleading as we have several kinds of cache files :-)

    But yes there had been a rather minor change within the image processor that may result in a differetn naming of default sizes. After clearing the cache all should re-generate.

  • tplowe56 Member
    edited July 7

    Sorry,
    it's just the cache files related to images. I did look at the naming of the files and suspect that is where the change occurred. The problem is my host processing seems to take forever to generate new cache files. I originally generated all my cache files locally using xampp, and then uploaded them to my server. I think I have over 15,000 images. (Family photo album, for a family with three professional shooters going back 22 years). I use the cache generator within ZP each time I create a new album which is fine, but this change appears to have affected over 15,000 images (of which many have multiple images sizes in the cache, for desktop, mobile, etc.). That code change may have created quite a headache for users with many images.

  • tplowe56 Member
    edited July 7

    Here is an example of the changes to the file naming convention, within the cache, for the same image, which is causing the regeneration of cached images. I see that the letter "c" is used on all old cached images in the file naming convention, but not the new.

    Old:
    Harbour Island.12.11.08_85_cw85_ch85_thumb.jpg

    New:
    Harbour Island.12.11.08_85_w85_h85_thumb.jpg

  • acrylian Administrator

    Yep, that is the change. It only applies to default sizes from the theme options like thumbs and sized images. I don't remember the actual details off hand anymore but it was a bug fix related to non consistent cache file names. I am sorry for the trouble this cause you.

  • tplowe56 Member
    edited July 13

    I am still having problems with this issue. I upgraded my Xampp install to regenerate the thousands of cache files needed for my site. But now find that it is impossible to get cachemanger to generate the proper thumbnails. When I force cachemanager to generate the _85_w85_h85_thumb naming convention, the thumbs are distorted. This is a thumb used by gallerific in the zpArdoise theme. As far as I can tell no other thumb uses this naming convention where this change is occurring.

    Old:
    Harbour Island.12.11.08_85_cw85_ch85_thumb.jpg

    New:
    Harbour Island.12.11.08_85_w85_h85_thumb.jpg

    I'm getting a little concerned about the lack of supported themes for ZP, and the subsequent issues with unsupported themes. ZP is superb CMS, but seems to be slowly losing a robust development community.

    FYI: Godaddy throttles my CPU on shared hosting platform when I try to generate too many cache files on their platform. Hence the need to generate in bulk locally and upload a ZIP, which works fairly well, when doing large volume.

    If I were to change themes this would be an absolute requirement. Godaddy server seems to be very slow at generating cache images on the fly sometimes, but works fine if I generate cache files for under, say 100 images, using cachmanager. Anything over that and I need to generate locally.

  • tplowe56 Member

    Is zpArdoise and galleriffic using a non standard naming convention?

  • acrylian Administrator
    edited July 13

    I'm getting a little concerned about the lack of supported themes for ZP,

    Yes, indeed, the lack of third party themes and plugins sadly has always been a problem actually.

    Themes cannot choose any naming convention as that is generated by the core image processing functions by the sizes requested.

    To use the cache manger themes best should register the required sizes via the theme options (although it can be done manually). zpGallerffic for sure does not do that since it is not even supported by its developer (and the galleriffic script itself is also rather dead to my knowledge). I don't even know if it registers anything at all.
    For zpArdoise l @vincent3569 surely can answer better.

    I will never exclude that there is a bug somewhere. Are the thumbs itself distored or just the display in the theme? (just asking…;-))

    So basically you want 85x85px cropped thumbs, right? I will try to reproduce that with zpArdoise

  • acrylian Administrator

    zpGallerffic for sure does not do that since it is not even supported by its developer (and the galleriffic script itself is also rather dead to my knowledge). I don't even know if it registers anything at all.

    Just realize that zpArdoise uses Gallerfic, so this is nonsense ;-)

    I see the last update for zpArdoise seems to be from 2017 so maybe he didn't yet implement the new functions for the cache manager registering of (default) sizes/crops. Those were actually added to the cacheManager plugin with his collaboration.

  • acrylian Administrator

    On the theme's themeoptions.php line 61 there is cacheManager::addThemeCacheSize($me, 85, NULL, NULL, 85, 85, NULL, NULL, true);

    Try to change that to
    cacheManager::addThemeCacheSize($me, 85, 85, 85, 85, 85, NULL, NULL, true); or cacheManager::addThemeCacheSize($me, 85, 85, 85, NULL, NULL, NULL, NULL, true); to see if it works then.

    If already on 1.5. you can also use cacheManager::addThemeDefaultThumbSize($me); for thumbs and cacheManager::addThemeDefaultSizedImageSize($me); for sized images as set on the theme options.

  • tplowe56 Member

    Ok thanks. I will try your suggestions. I have already been editing that file but have not found success yet. Thanks for your help. I will report my findings.

  • tplowe56 Member

    The problem is very simple.

    1.)The cache manager and the theme generate 2 differently named thumbnails if galleriffic option is chosen.

    2.) If I try to manually enter the correctly named thumbnail in cachmanager, it is shrunk rather than cropped. Distorted.

    3.) The correctly processed thumbnail is named such that the theme does not recognize the thumbnail.
    b.) The theme does not recognize this correctly sized thumbnail
    generated by cachemanger.

      Harbour Island.12.11.08_85_cw85_ch85_thumb.jpg
    
  • acrylian Administrator
    edited July 13

    I am sadly not familiar enough with the theme to know how it sets its image sizes. Of course if the cachemanager definition and the actual custom sizes set on the them (which these definitions suggest) don't match, the theme will not use the cachemanager generated ones.

    The image sizing functions are a bit tricky at times.

    You can try to remove the first sizing parameter like this on the above ones I mentioned like cacheManager::addThemeCacheSize($me, null, 85, 85, NULL, NULL, NULL, NULL, true);

  • tplowe56 Member

    Nothing works. I will just quit using galleriffic option, since it is no longer in development. I will need to generate new thumbs for entire site but that may be best option.

  • acrylian Administrator

    Maybe wait until VIncent responds before you change it right now. No matter if gallerific or not the theme should be able to use the sizes generated by the cachemanager. Just to be sure this is no bug somewhere.

  • tplowe56 Member
    edited July 13

    Well.....I have forced cachemanager to create the correctly named thumb for zpArdoise/Galleriffic, but it still not correct. When loading the images from the front end (without cached files) it creates a slightly larger thumbnail. The theme then displays them both in the same 85x85px box, but the cachmanager thumbs are then of a lower quality.

    So now I have the theme and cachemanger creating the same named thumbnails but they are different dimensions. One is 85px on the long side, other 85px square.

    Something weird going on. Vincent will have to look at this.

  • acrylian Administrator
    edited July 14

    I just tried and I can reproduce the issue so far that the default thumb method of the cachemanager does not match the files the actual default thumb function generates.

    The option is using percentage values instead of px values which the image function actually do. I have to take another look. So this is not a theme issue directly.

  • acrylian Administrator
    edited July 14

    The support build has a small fix so that if cacheManager::addThemeDefaultThumbSize($theme); is defined it should now match the filename/size that printImageThumb() generates. Which zpArdoise seems to do as far as I can see.

  • tplowe56 Member
    edited July 14

    Thanks for looking into this Acrylian.

    For future posts it might be easier for me to demonstrate an issue like this with images. Can I use the described markdown to post images? I presume I have to upload them to my server and then describe the proper path?

    "Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.

    Inline image syntax looks like this:"

    ![Alt text](/path/to/img.jpg)
    
    ![Alt text](/path/to/img.jpg "Optional title")
  • acrylian Administrator
    edited July 14

    That actually should work unless this forum software does not allow embeding of images (which I currrently don't know). For sure we have disabled uploading of anything.

    But in any case you can directly link to images in question without embedding them itself.

  • tplowe56 Member

    Thanks

  • tplowe56 Member

    Acrylian,

    with the new build and code added to themeoptions.php, cachemanager does not generate ANY thumbnails for zpArdoise when using gallerific option. I think Vincent needs to take a look at this but he does not appear to be around.

    No code I have tried on themeoptions ever shows an 85 x 85px thumbnail in the cachmanager plugin settings, as it does with other themes.

    BTW - What process triggers the registration of the theme with the cachemaneger?

  • acrylian Administrator
    edited 10:28AM

    The theme might need some changes as well as I mentioned above.

    If you define new cacheManager settings you might need to disable and re-enable the theme as those are registered and may not be recognized initially.

    BTW - What process triggers the registration of the theme with the cachemaneger?

    You can directly see that in the themeoptions.php file of the theme.

  • tplowe56 Member

    Ok, thats what I have been doing, activating an other theme and then re-activating zpArdoise.

    Thanks.

Sign In or Register to comment.