We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38318
    • 128 Posts
    I've installed the gallery extra and am using the same code that works on another domain I have but I get a missing link on the front end. I can see the thumbnail in the gallery extra but not on the live site. No error messages appear to show. I'm thinking it might be something to do with phpthumb not sure if I have to install anything to get this to work. I have had issues lately with permissions, is there a particular file I need to check permissions for?

    Any help most grateful.
    • Make sure your template has the base href set to the site_url system setting, looks like a broken path.

      Do you have a link to this or is this on your local?
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 38318
        • 128 Posts
        Yes I have <base href="[[++site_url]]" /> in the header.

        A link to the page http://www.fencing4farmers.co.uk/stock.html

        All my packages are up to date.
        • Make sure you have phpThumbOf installed and try rendering your image without phpthumb to see if it works on your gallery.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 38318
            • 128 Posts
            Yes I have phpThumbOf installed. How do I render without?

            My code at the moment is


            [[!GalleryAlbums? 
            &toPlaceholder=`GalleryAlbums` 
            &limit=`0` 
            &albumCoverSort=`rank` 
            &prominentOnly=`0` 
            &rowTpl=`newGalAlbumRowTpl` 
            &thumbWidth=`195` 
            &thumbHeight=`140`
            ]]
            
            [[!Gallery? 
            &checkForRequestTagVar=`1` 
            &toPlaceholder=`Gallery` 
            &useCss=`0` 
            &containerTpl=`newGalleryAlbumTpl` 
            &thumbWidth=`195` 
            &thumbHeight=`140` 
            &thumbTpl=`newGalItemThumb` 
            &imageWidth=`800` 
            &imageHeight=`800`
            ]]
            
            [[!If? &subject=`[[+Gallery]]` &operator=`isempty` &then=`[[+GalleryAlbums]]` &else=`[[+Gallery]]`]]
            • Check the code inside your newGalItemThumb, newGalAlbumRowTpl and newGalleryAlbumTpl chunks.
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 38318
                • 128 Posts
                I've tried using just the gallery call

                [[Gallery? &album=`Stock`]]


                But still get a broken link.

                Here's the code for newGalAlbumRowTpl. Not sure where it's referencing phpThumbOf

                <div class="albumPreview">
                    <h3><a href="[[~[[*id]]?&[[+albumRequestVar]]=`[[+id]]`]]">[[+name]]</a></h3>
                    <div class="thumb">
                        <a href="[[~[[*id]]?&[[+albumRequestVar]]=`[[+id]]`]]"><img src="[[+image]]" alt="[[+name]]"/></a>
                    </div>
                    <div class="desc">
                        <p>[[+description]]</p>
                        <a href="[[~[[*id]]?&[[+albumRequestVar]]=`[[+id]]`]]" class="view">View gallery</a>
                    </div>
                </div>
                  • 38318
                  • 128 Posts
                  I've checked the difference in gallery folders between the domain that works and the one that doesn't.
                  It appears there are no images on the server in the folder assets/gallery which there are on the one that does work. I can see this folder through my cpanel but for some reason I can't when I look at it through Cyberduck. Could this be the root of the problem?
                    • 38318
                    • 128 Posts
                    I've deleted and reinstalled Gallery and it now seems to work! Why didn't I think of that before? Usually the first thing to test!
                      • 38318
                      • 128 Posts
                      Although saying that the first thumbnail now appears but when you click the album to view the contents the broken link is still there. When I look at the directory the jpg doesn't appear to have been placed which I assume is why it's showing as a broken link. Why would the system not be placing a copy in this location?