• Resolved digbymaass

    (@digbymaass)


    It’s set to 1 random original image from all galleries. It’s currently stuck on one image which it is not displaying, either in the sidebar or the lightbox.
    If I change to 1 random thumbnail, it displays the same unchanging thumbnail which does display in the lightbox.
    I have cleared all caches within wordpress and browsers.
    Inspector gives:

    <div class="widget-wrap">
    	<div class="hslice" id="ngg-webslice">
    	<h4 class="entry-title widget-title widgettitle">Pics from the past</h4>
    		<div class="ngg-widget entry-content">
                		<a href="" title=" " data-image-id="1850" class="ngg-fancybox" rel="2ecc8c8a1e84038c8ced611b4df132aa">
    				<img title="DSCF2007" alt="DSCF2007" src="" width="217" height="180">
    			</a>
    	    	</div>
    	</div>
    </div>

    The actual link to the image, which definitely exists, is:
    https://carnethy.com/wp-content/gallery/general-not-quite-photopick/DSCF2007.jpg

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Imagely

    (@imagely)

    Hi @digbymaass,

    We are sorry but with the latest NextGen update, the random selections are cached for 24 hours so you would get a different and random image every 24 hours.

    You can test that if you clean your image cache on NextGen Gallery:
    – Go to Gallery > Other options > Miscellaneous > and click on “Clear image cache”.

    Thanks for your understanding,
    Mihai

    Thread Starter digbymaass

    (@digbymaass)

    I don’t want it to cache for 24 hours. I want it to change on every page load as before. How do I change it?
    I feel sure you will have provided a setting.

    Thanks for your understanding

    Plugin Contributor Imagely

    (@imagely)

    Hi @digbymaass!

    Thank you for sharing that code from the inspector.
    But, I just was wondering if you could share with us a screenshot of that widget configuration so we can take a look.
    Would that be ok?

    Many thanks!

    – Gaby

    Thread Starter digbymaass

    (@digbymaass)

    Since one can’t post a screenshot here… settings are
    Show 1 Original Images
    Random
    Enable IE8 Slices checked
    Custom width & height 217×180
    Select: All galleries.

    But the puzzle’s been answered in the first reply – “the random selections are cached for 24 hours so you would get a different and random image every 24 hours”

    I’m used to seeing the image change with every page load and be different in each browser which is why it appeared stuck. It is changing after 24 hours.

    Except this morning no photo is loading at all. Two machines, 4 browsers. No image – “The requested content cannot be loaded. Try again later”
    I’m sure yesterday the image did start loading later on in the day.

    Can you give me some code to add to functions.php to clear the cache on every page load and return the widget to its previous behaviour (or to not cache the random image)?

    • This reply was modified 6 years ago by digbymaass.
    Thread Starter digbymaass

    (@digbymaass)

    Having cleared the image cache from the plugin settings the image is now loading. As expected it is the same in all the browsers – ie we are going to be with this image for 24 hours.
    Clearing the cache again gives a different random image.

    Where is the cache? I can’t find anything in wp-content

    • This reply was modified 6 years ago by digbymaass.
    mbsharp

    (@mbsharp)

    I definitely support this ‘complaint’. A very important feature of the previous, and long-standing, practice was that the random image(s) changed on every page load.

    There are two issues. One, that the random function doesn’t work by selecting the correct number of images requested. Two, that whatever selection does get made is retained at all. Both need fixing.

    Plugin Contributor Imagely

    (@imagely)

    Hi everyone,

    I know that it may sound like we’ve changed a thing and it doesn’t currently work as expected and I don’t exclude that our developers would try to adjust how the random selection works in one of the next updates. I need to mention here that this is caused by the alternative random solution in case that the order by RAND() by SQL is being disabled.

    About refreshing the cache on each page’s (re)load and getting new gallery selections we have decided to intentionally change that due to the query’s heavy load on the server’s resources and especially because such widgets are meant to be displayed on multiple pages and using a Gallery widget that dynamically loads and refreshes the caching on each page (re)load significantly increases the page’s/post’s loading time.

    Thanks for your understanding,
    Mihai

    Thread Starter digbymaass

    (@digbymaass)

    As someone from NextGen suggested on another thread, you could generate a random selection from nominated galleries and cache them, retrieving a queued cached image on each page load. Thus not generating a random image each time. Regenerating the cache could happen in the background when the cache is exhausted.
    You could also use thumbnails in the cache rather than the full size one as appears to be the case now, and link to the full size image only after retrieving the cached thumb.

    In the meantime if you could suggest a workaround code for those of us who wish to use a gallery of reasonable size and suffer the performance hit then we would be grateful.

    Though I’ll probably revert back to a previous version of NextGen as it was only really the random display widget and nice lightbox that kept me with it.

    Thanks for your understanding.

    • This reply was modified 6 years ago by digbymaass.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘NextGen sidebar widget stuck and not showing’ is closed to new replies.