Closed heoehmke closed 3 years ago
Great research, thank you very much @heoehmke!
I wondered a bit, cause on our multi-language websites this worked perfect so far. But we've no fallbacks defined here. Maybe that's a difference.
I tried your fix with one of our projects and it worked as before and as expected. So if this works for you on others, fine 🙂
Released in 2.2.5 and 3.0.4
As described in #23, we also noticed the cookie banner didn't consider dimensions anymore. I tested the bugfix from #24, which unfortunately doesn't work for us. The
/api/kd-gdpr-cc
route is always called with the default dimension value (language=en
in our case), so the cookie banner always shows in english, even if we're on the german page.I took some time to debug, and maybe we have messed up our content repository, but calling
site.dimensions
here doesn't consider the current dimension and always returns the default dimension value: https://github.com/KaufmannDigital/KaufmannDigital.GDPR.CookieConsent/blob/ae3553a2fdddac9cef726778ebe2b02a77854629/Resources/Private/Fusion/Root.fusion#L12On the other hand calling
site.context.dimensions
returns the correct dimension value with the fallback dimension value. As this part of neos isn't documented very well I'm not sure if that's the right way, but I saw other places in the neos codebase where dimension values are retrieved by callingsite.context.dimensions
rather thansite.dimensions