Fixed 2.3.11 bug - advanced cookie banner?

Alvin63

Well-known member
Licensed customer
Affected version
2.3.11
As mentioned in the thread linked below. Since upgrading to 2.3.11 cookie banner doesn't work and then a redirect comes up instead of the forum page opening. I'm using the Xenforo advanced cookie banner, albeit with some styling. I've temporarily switched to the simple cookie banner and there is no issue when using this.

 
From the referenced thread:

@Chris D this seems like a genuine bug, perhaps introduced in 2.3.11, maybe earlier? I am not sure.

Short version: the template still calls cookie-consent, but the JS handler seems gone.

In XF 2.3.11, public:misc_cookies still renders the Accept/Reject cookie buttons with data-xf-click="cookie-consent":
/src/addons/XF/_data/templates.xml:65610 and :65619.

But the 2.3.11 JS does not appear to register a cookie-consent click handler. The event system then falls through to normal link navigation, so /misc/cookies?update=1&accept=1... is loaded as a normal HTML page. XF\Pub\Controller\MiscController::actionCookies() applies consent and returns a redirect reply, which explains the visible “Redirecting” page.

In XF 2.2.19 this was handled by XF.CookieConsentClick in js/xf/core/structure.js:3352, registered at :3525 via XF.Event.register('click', 'cookie-consent', 'XF.CookieConsentClick'). That equivalent handler/registration seems absent in 2.3.11.

If this is wrong, then apologies in advance. I just thought it might help to investigate, as a lot of forums use the consent banners.
 
The data-xf-click="cookie-consent" bit not having a handler is still something of a bug (it should!), but my add-on causing more redirects should be fixed in the next version.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.14).

Change log:
Fix optional browser storage not being cleared when rejecting cookies (#2722)
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom