Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Cookie consent

Status Resolved
Add-on / Version Speedy 1.3.1
Severity
EE Version 6.0.6

Jeffrey Otten

Aug 02, 2021

Hello,

When adding

{exp:speedy:fragment}

  ... content to be cached ...

{/exp:speedy:fragment}

for example the homepage I’m not able to agree (accepteer) with the cookies. The popup remains active in the screen. When I delete {exp:speedy:fragment} it’s working correct.

The code in the footer (i’m using an embed, not a layout) and I have also tried to add {exp:speedy:escape}, and for cache i’m using Redis.

{if ! consent:has_responded:ee:cookies_functionality}
    <div class="consent">
        {exp:consent:form
          consent='ee:cookies_functionality|ee:cookies_performance|ee:cookies_targeting|cookies_social_embedded'
          form_id='cookieConsentForm'
        }
            <h2>cookies, akkoord?</h2>
<p>            </p><p>Accepteer alle cookies of bekijk de instellingen</p>
<p>              {consents}<br />
                  <label><br />
                      <input type="hidden" name="{consent_short_name}" value="y" {if consent_granted} checked {if:elseif ! consent_response_date}checked{/if}><br />
                  </label> <br />
              {/consents}<br />
              <br />
              </p><div class="consent-inner-footer">
<p>                <button class="btn-consent" type="submit">accepteer</button><br />
                <a href="{site_url}cookies/">bekijk instellingen</a><br />
              </p>
</div>
<p>        {/exp:consent:form}<br />
    </p>
</div>
<p>  {/if}

 

#1

BoldMinded (Brian)

Hi, Jeffrey. I’m not totally understanding the situation. Is that template code wrapped in an escape tag? And you’re expecting it to not be cached? Did you try the escape tag with any other content or template code besides the cookie consent tag? The scenario should be simplified… Try another scenario without the cookie consent code… use use basic html and the escape tag and see if it works as expected… then we can move onto the consent code portion.

#2

BoldMinded (Brian)

Closing this ticket b/c of no response in a month.

#3

Jeffrey Otten

Comment has been marked private.

#4

Jeffrey Otten

Comment has been marked private.

#5

Jeffrey Otten

Comment has been marked private.

#6

BoldMinded (Brian)

It looks like you’re using full page static caching? Meaning you probably have an index_redis_default_site.php file in the root of your site’s directory? If so, then the escape tag won’t work at all. In fact no EE tags will work. Static caching creates a fully rendered version of the page’s html and just serves it back to the user. It completely bypasses ExpressionEngine.

https://docs.boldminded.com/speedy/docs/static-caching

Login to reply