Bug #101456
closedtype="text/javascript" is back
0%
Description
Hello all,
as already written in ticket #97990 , the problem is unfortunately present again in the current version 11.5.30.
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.
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
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.
Updated by Riccardo De Contardi over 1 year ago
- Related to Task #97990: Remove type="text/javascript" added
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
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') ); }
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.
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.