This extension provides functionality to create a customizable cookie consent for your website. It is developed for flexibility to be customized in accordance to your data security guidelines.
10
stars
13
forks
source link
Path of javascript and stylesheets is incorrect when used with TYPO3 11 #38
In RenderPreProcessHook.php the javascript and styles are included.
if (true === (bool)$settings['addJavaScript']) {
$pageRenderer->addJsFooterLibrary(
'cookie_consent',
PathUtility::getAbsoluteWebPath('typo3conf/ext/mindshape_cookie_consent/Resources/Public/JavaScript/cookie_consent.js')
);
}
if (true === (bool)$settings['addStylesheet']) {
$pageRenderer->addCssFile(
PathUtility::getAbsoluteWebPath('typo3conf/ext/mindshape_cookie_consent/Resources/Public/Stylesheet/cookie_consent.css')
);
}
In TYPO3 11 though the extension is installed inside of vendor/mindshape/mindshape-cookie-consent/ not typo3conf/ext/mindshape_cookie_consent/. To temporarily fix this I am using a symlink mindshape_cookie_consent -> ../../../vendor/mindshape/mindshape-cookie-consent/ inside of typo3conf/ext.
I didn't know vendor installation is already possible in v11.
Anyway, this is solved in the upcoming compatibility update for v12, see: ff10dc129435cf4e8bc9c7cd4da96252cd1522a3
In
RenderPreProcessHook.php
the javascript and styles are included.In TYPO3 11 though the extension is installed inside of
vendor/mindshape/mindshape-cookie-consent/
nottypo3conf/ext/mindshape_cookie_consent/
. To temporarily fix this I am using a symlinkmindshape_cookie_consent -> ../../../vendor/mindshape/mindshape-cookie-consent/
inside oftypo3conf/ext
.