Closed jacques2017 closed 1 year ago
Hei @jacques2017, Feel free to join the T3 Slack channel to discuss this in detail, or please send me a PM. https://typo3.slack.com/archives/C04NB2ZP30U
This is not familiar to me, so I would need to take a closer look on your js file.
Thanks for your Issue!
Hi eibiflo, thanks for your answer.
In file \cf-cookiemanager\Resources\Public\JavaScript\thirdparty\consent.js at line 23 I change 'current_lang': 'en', to 'current_lang': 0,
Now it works for me. Is it possible to set the language for the cookiemanager-configuration in the TYPO3-backend? Now I changed the js-file on the server, but it will be overwritten at the next version.
My js-file now looks like this:
`/*!
Modified by Codingfreaks for Typo3 CMS integration */ (function () { 'use strict'; /**
@returns {Object} cookieconsent object with API */ var CookieConsent = function (root) {
/**
var _config = { 'mode': 'opt-in', // 'opt-in', 'opt-out' 'current_lang': 0, 'auto_language': null, 'autorun': true, // run as soon as loaded 'page_scripts': true, 'hide_from_bots': true, 'cookie_name': 'cf_cookie', 'cookie_expiration': 182, // default: 6 months (in days) 'cookie_domain': window.location.hostname, // default: current domain 'cookie_path': '/', 'cookie_same_site': 'Lax', 'use_rfc_cookie': false, 'autoclear_cookies': true, 'revision': 0, 'script_selector': 'data-service' }; `
Hei @jacques2017
The language configuration actually comes from your site config.yaml; here, the sys_language_uid is used. Could it be that you had an old version before, and this has been occurring since an update?
In fact, the ID should be set here: https://github.com/eibiflo/cf_cookiemanager/blob/main/Classes/Domain/Repository/CookieFrontendRepository.php#L460
This actually comes from: https://github.com/eibiflo/cf_cookiemanager/blob/main/Classes/Controller/CookieFrontendController.php#L57
This changed in version 1.1.x; maybe you had an old version, or can you rule that out?
It looks like the _setConfig in js is not called, so it use the Default settings.
I would suggest sending me a quick Slack message with your real host name, and we can discuss this in a private chat. If we can find the error, I can also publish a patch right away. I'm genuinely interested in where the issue might be; the extension runs smoothly in my installations.
@jacques2017 You can try the release: https://github.com/eibiflo/cf_cookiemanager/releases/tag/v1.3.4 by a simple composer update.
I changed the default language to 0. However, I'm still interested in why this doesn't work for you by default.
@jacques2017 Has your issue been resolved? If so, I will close the issue.
Hi, I get an js-error:
I use the latest Version in Composer-Mode in TYPO3 V12 The site-configuration is "DE" . I have the following debug-log:
Why is "_config.current_lang" = "en" and not "de"? In the backendconfiguration of cf_cookiemanager the language is set to "de"
Please help.
Jacques