mindshape-GmbH / mindshape_cookie_consent

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

Wrong path for resources #9

Closed Performance-freak closed 3 years ago

Performance-freak commented 3 years ago

Hi,

I just found a bug in version 1.0.6 of this extension. In RenderPreProcessHook.php there are 2 calls to PathUtility::getAbsoluteWebPath. 1 for CSS & 1 for JS. For most people this will work as it is, but only out of pure coincidence. The strings you pass both start with a slash. Thus PathUtility::getAbsoluteWebPath will treat them like absolute paths and return the exact string you passed to it without changing it.

As a result, there will be 404 errors for JS & CSS in the frontend, if the Typo3 root is not the document root, because it always returns "myDomain.com/typo3conf/..." even when it should be "myDomain.com/mySite/typo3conf/..."

It will work if you remove the leading slashes.

featdd commented 3 years ago

Hi @Performance-freak,

I thanks for the hint, solved this in 9d211e458136962ffa751c23183805da1ac3722e