We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46581
    • 9 Posts
    Hello,

    I have an issue that could simply be caused by improper use of uncached tag calls in my templates and chunks.

    The site is http://www.carltacon.com and what is supposed to happen is that the home page is meant to show you a different image every time you visit it. However, the very first visit after clearing the cache will once again set the cache and lock in that image for subsequent visits. From my understanding of how caching works I thought I was using the "!" operator in the tags correctly, but I may be wrong. Any help in solving this would be greatly appreciated.

    My details:

    • MODX Version: 2.2.14
    • PHP Version: 5.3.13
    • MySQL Version: 5.5.32-log
    • Additional Server Info: Hosted on Netfirms
    • Installed MODX Add-ons: Gallery, getPage, getResources, TinyMCE, Wayfinder. All latest versions

    I'm using Gallery to manage the artworks, The structure is as follows:

    • There are two parent albums, Artwork and Public works
    • Each artwork gets its own album since there are several views for each work
    • Each image in an album is a different view of the album's artwork.

    Here is the call to the Gallery snippet from my home page:
    [[!Gallery?
    		&tag=`home`
    		&sort=`rand`
    		&thumbTpl=`artist-template-home-image`
    		&imageWidth=`780`
    		&imageHeight=`585`
    		&limit=`1`]]
    


    The artist-template-home-image chunk looks like this:
    [[!GalleryItem? &id=`[[!+id]]` &albumTpl=`artist-template-home-image-album`]]
    <div id="gallery-desc">
    	<div id="home-image">
    		<img src="[[!+image]]" alt="[[!+galitem.albums]] - [[!+description:striptags:empty=`[[!+name]]`]]"/><br />
    		[[!+galitem.albums]][[!+description:notempty=` - [[!+description:striptags=`<em><strong><span><a>`:nl2br]]`]]
    	</div>
    </div>
    


    And lastly, here is the artist-template-home-image-album chunk:
    [[!+name]]