We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Parse order issue with JCOGS image inside of a Speedy Fragment tag

Development and Programming

dj-rowan's avatar
dj-rowan
31 posts
2 years ago
dj-rowan's avatar dj-rowan

Hello all,

I’m running into a recurring issue with Speedy & Jcogs image that I’m wondering if anyone else has solved.

It seems that the parse order of the {exp:speedy:fragment ..} tag and the {exp:jcogs_img:pair..} tag don’t play nice together. I have found that I have to escape jcogs tags inside of speedy fragment tags. We are migrating a site from CE Cache with CE Image over to Speedy & jcogs image, and this issue is coming up. I’m about half way through it, but wondering if there is some other way I can tell speedy to parse the internal tags before caching? Or, set the order of the jcogs tag to happen before speedy fragment? Here’s an example:

{exp:speedy:fragment
    key="video_feed_card"
    tags="video_feed"
    url_override="{channel_short_name}/{entry_id}"
    ttl="{global:ttl_1_day}"
    driver="{global:env_speedy_driver}"
}
...
                {exp:speedy:escape}
                    {exp:jcogs_img:pair allow_scale_larger="yes" src="{video_image}" width="370" height="250" crop="yes" fallback_src="/images/uploads/default_image.jpg" save_type="jpg" quality="{gv:thumbnail__quality}"}
                    {made}
                    {/exp:jcogs_img:pair}
                {/exp:speedy:escape}
...
{/exp:speedy:fragment}

THE FIX:

We can bypass this problem by adding parse="inward" to the fragment tag, and then I don’t need to use the {speedy:escape} tag pair.

{exp:speedy:fragment
    key="video_feed_card"
    tags="video_feed"
    url_override="{channel_short_name}/{entry_id}"
    ttl="{global:ttl_1_day}"
    driver="{global:env_speedy_driver}"
    parse="inward"
}

I am posting here after successful debugging on EE Slack.

Please follow up if you have any related suggestions or if this helped you!

Sorry, the code editor and markdown is not working as expected, so the code above looks a bit strange.

Rowan

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.