We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1266
    • 50 Posts
    Apologies as I couldn't find the specific Gallery 1.4.0-rc1 support thread.

    I am using Gallery on the website for the studio where I work on the porfolio pages. For example:

    http://angrynyc.com/portfolio/packaging.html

    It looks ok now, but when I upgraded to to 2.1.5, all of the thumbnails become ': syntax error, unexpected T_LNUMBER in on line' (just like that, no line number). I've had to strip down the template that shows the thumbnails in our portfolio pages. This is what the code looked like before I upgraded to 2.1.5:

    <div class="gallery-thumb">
        <a class="gallery-swap" href="[[+tags:limit=`5`:is=`video`:then=`[[+url]]`:else=`[[+image_absolute]]`]]" target="_blank" title="[[+name]]" rel="[[+tags:limit=`5`:is=`video`:then=`video`:else=`[[+mediatype]]`]]">
            <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
        </a>
        <p class="thumb-caption">[[+description]][[+url:ne=``:then=`[[+tags:limit=`5`:is=`video`:then=``:else=`
    <a href="[[+url]]" target="_blank">view here</a>`]]`:else=``]]</p>
    </div>
    


    From trial and error it seems like the culprits are the imbedded 'tags' placeholders and output filters.

    It still works on my local/test install on MAMP though, after the upgrade to 2.1.5. Is there a likely file that didn't update properly? I've already run the upgrade setup twice.

    Thank you to anyone with advice in advance!

    This question has been answered by splittingred. See the first response.

    • discuss.answer
      • 28215
      • 4,149 Posts
      I'm willing it's this:

      [[+tags:limit=`5`:is=`video`:then=`[[+url]]`:else=`[[+image_absolute]]`]]
      


      You should turn that into a snippet.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 1266
        • 50 Posts
        Just so I am clear, did you mean to make a snippet that checks for 'video' in the string, then pass the 'tags' placeholder to that snippet as a parameter?

        So there's something about 2.1.5 that is still making nesting placeholders wonky, but putting a snippet in its place should work?

        Thanks for the quick reply!