Issue Bug Closed

#101456type="text/javascript" is back

Norbert Florineth 07/27/23, 07:08 updated 08/02/24, 18:51

Description

Hello all,
as already written in ticket #97990 , the problem is unfortunately present again in the current version 11.5.30.

Reviews 1

History 9

  1. Andreas Kienast commented and changed status New Needs Feedback 07/27/23, 07:16

    I’m confused. The mentioned patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/75383 was never ported to 11.5 at all.

  2. Riccardo De Contardi commented 08/06/23, 10:21

    @Norbert Florineth can you add the code you used to reproduce the problem?
    (TypoScript, Fluid, etc)

    Thank you

  3. Norbert Florineth commented 08/07/23, 06:57

    Hello @Riccardo De Contardi,
    I did not use a special code. In a recent project i installed the extension mindshape_cookie_consent [[https://extensions.typo3.org/extension/mindshape_cookie_consent]] . After checking the project with the W3C validator, I saw that the problem was back. So I looked at the file mentioned in ticket #97990 and saw that “type” is there again.

  4. Riccardo De Contardi changed Related to #97990 08/13/23, 10:31

  5. Riccardo De Contardi commented 08/13/23, 13:24

    On a fresh TYPO3 11.5.30 I added the following TS Code:

    page.includeJS.myjs = /fileadmin/test.js
    page.includeJS.bs = https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js

    Result: in page (view source) I see:

    <script src="/fileadmin/test.js?1691317340"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>

    Same with includeJSFooter

  6. Riccardo De Contardi commented 12/17/23, 15:50

    I repeated the same test on my previous comment on 11.5.33 and I also installed mindshape/mindshape-cookie-consent (version 2.2.5)

    The results are:

    1) The script I’ve added still don’t have the text/javascript text

    2) BUT… cookie-consent added on the footer:

    <script src="/typo3conf/ext/mindshape_cookie_consent/Resources/Public/JavaScript/cookie_consent.js?1702827111" type="text/javascript"></script>

    If I am not wrong, the file is added by EXT:mindscape_cookie_consent/Classes/Hook/RenderPreprocessHook.php (lines 82-87):

                    if (true === (bool)$settings['addJavaScript']) {
                        $pageRenderer->addJsFooterLibrary(
                            'cookie_consent',
                            PathUtility::getAbsoluteWebPath('typo3conf/ext/mindshape_cookie_consent/Resources/Public/JavaScript/cookie_consent.js')
                        );
                    }
  7. Georg Ringer changed Sprint Focus On Location Sprint 06/11/24, 20:08

  8. Benni Mack commented and changed status Needs Feedback Closed 08/02/24, 18:49

    IMHO this has been solved in TYPO3 v12, and we won’t fix this in v11, as this is not a priority issue.

  9. Benni Mack commented 08/02/24, 18:51

    If you feel this is the wrong decision or you can reproduce this in v12, let me know.