Title: Consent shortcode causing infinite refresh
Last modified: December 23, 2021

---

# Consent shortcode causing infinite refresh

 *  Resolved [dbacksbst](https://wordpress.org/support/users/dbacksbst/)
 * (@dbacksbst)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/)
 * When I use the consent shortcode to hide a HubSpot form and visit the page, the
   page will continuously reload.
 * Code:
 *     ```
       [cmplz-consent-area  text="Enable this content by clicking this link" category="marketing"]
       [hubspot type=form portal=xxx id=xxx]
       [/cmplz-consent-area]
       ```
   
 * Furthermore, when I click the link to give consent, nothing happens (I suspect
   the page is reloading too quickly for the cookie settings to appear).
    -  This topic was modified 4 years, 5 months ago by [dbacksbst](https://wordpress.org/support/users/dbacksbst/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15193005)
 * Hi [@dbacksbst](https://wordpress.org/support/users/dbacksbst/)
 * When used in combination with caching, the ‘cache_redirect=true’ attribute should
   be added to the shortcode: `[cmplz-consent-area cache_redirect=true]`
 * With the cache_redirect parameter added, the plugin redirects the pages to a 
   URL with ?cmplz_consent=1 behind it which allows the caching tool to cache the
   consent page separately.
 * Hope it helps!
    Kind regards, Jarno
 *  Thread Starter [dbacksbst](https://wordpress.org/support/users/dbacksbst/)
 * (@dbacksbst)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15215395)
 * Hi [@jarnovos](https://wordpress.org/support/users/jarnovos/)
 * I have tried adding `cache_redirect=true`, but the same behavior occurs. The 
   first time I load the page, it loads normally. After I click the placeholder 
   link and any time I visit the same page afterwards, it infinitely refreshes. 
   With the `cache_redirect` option, I can see the URL switching back and forth 
   between the original page URL and the URL ending in `?cmplz_consent=1L#cmplz_consent_area_anchor`.
 *  Thread Starter [dbacksbst](https://wordpress.org/support/users/dbacksbst/)
 * (@dbacksbst)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15226023)
 * Hi [@jarnovos](https://wordpress.org/support/users/jarnovos/)
 * Noticed the issue was marked as resolved, but it is not. No worries, I suspect
   this was because it took me a while to reply over the holiday break. I set it
   back to unresolved and tagged you so we can continue our discussion.
 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15228135)
 * Hi [@dbacksbst](https://wordpress.org/support/users/dbacksbst/),
 * Can you provide an URL to the website/page in question, so we can look into this
   behavior?
 * Kind regards,
    Jarno
 *  Thread Starter [dbacksbst](https://wordpress.org/support/users/dbacksbst/)
 * (@dbacksbst)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15229519)
 * I’d rather not post it publicly, is there a way I can send you the link privately?
 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15234486)
 * Hi [@dbacksbst](https://wordpress.org/support/users/dbacksbst/),
 * Of course, please feel free to reach out to us at: support(at)complianz.io.
 * Kind regards,
    Jarno

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Consent shortcode causing infinite refresh’ is closed to new replies.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/consent-shortcode-causing-infinite-refresh/#post-15234486)
 * Status: resolved