TYPO3GmbH / ext-usercentrics

This extension integrates Usercentrics (Compliance and Consent Management) into TYPO3.
GNU General Public License v2.0
4 stars 6 forks source link

Render of Inline Javascript #12

Closed Ragna-30988 closed 4 years ago

Ragna-30988 commented 4 years ago

Bug Report

Prerequisites

Description

The JavaScript which is added as inline is not rendered. As a test I tried to add an alert, as described in the readme and nothing happened in the frontend.

I also found the bug in your code. In T3G\AgencyPack\Usercentrics\Hooks\PageRendererPostProcess::render function you only render the jsFiles and jsFooterFiles array but not the jsInline Why are the jsFooterFiles rendered if they are not added by the addLiabrary function in the T3G\AgencyPack\Usercentrics\Hooks\PageRendererPreProcess class.

Steps to Reproduce

  1. [First Step]
    plugin.tx_usercentrics {
    settingsId = {$plugin.tx_usercentrics.settingsId}
    jsInline {
    10.value (
      alert(123);
    )
    10.dataServiceProcessor = reCAPTCHA
    }
    }

Expected behavior: I expect that i get an alert in the front on activating the reCAPTCHA but nothing happend.

Actual behavior: The alert is not rendered into the code.

Versions

9.0.0 TYPO3 9.5