Closed tomnoir closed 6 months ago
@tomnoir Thanks for reporting the issue. In regular foreach loops I always add a .hasOwnproperty check, which catches this kind of stuff, but in this case your solution works fine. I have created a branch in premium and free. We'll include it in the next update. In the meantime, you can copy over the complianz.min.js and complianz.js files from cookiebanner/js in this branch from the free plugin:
Let me know if this resolves your issue!
@rlankhorst Yes, this fixes it and the banner works. Thank you for the quick reply and fix!
@tomnoir great, thanks for confirming! I'll close this issue, it will get merged in one of the coming releases.
We have an issue on some pages with Complianz 7.0.7 premium.
It seems like that on all pages that use Prototype.JS, there is a JS error in the
cmplz_set_category_as_body_class
function, preventing the banner from being shown. It iterates over the cookie categories and tries to add these as classes to the body tag. Yet it seems, that in this case it not only iterates over the array of strings, but also over built-in methods of the JS array (like the .each-function), which the errors in trying to add them to the classes list of the body tag.If you could add a check to
cmplz_set_category_as_body_class
whether the current element in the iterator is a string, this would probably solve the problem.Best, Thomas