Project

General

Profile

Actions

Bug #101456

closed

type="text/javascript" is back

Added by Norbert Florineth over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-07-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #97990: Remove type="text/javascript"Closed2022-07-21

Actions
Actions #1

Updated by Andreas Kienast over 1 year ago

  • Status changed from New to Needs Feedback

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

Actions #2

Updated by Riccardo De Contardi over 1 year ago

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

Thank you

Actions #3

Updated by Norbert Florineth over 1 year ago

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.

Actions #4

Updated by Riccardo De Contardi over 1 year ago

  • Related to Task #97990: Remove type="text/javascript" added
Actions #5

Updated by Riccardo De Contardi over 1 year ago

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

Actions #6

Updated by Riccardo De Contardi 11 months ago

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')
                    );
                }
Actions #7

Updated by Georg Ringer 5 months ago

  • Sprint Focus set to On Location Sprint
Actions #8

Updated by Benni Mack 4 months ago

  • Status changed from Needs Feedback to Closed

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

Actions #9

Updated by Benni Mack 4 months ago

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

Actions

Also available in: Atom PDF