Bug #18861
closedconfig.removeDefaultJS=1 leaves empty script block
0%
Description
The TypoScript line:
page.config.removeDefaultJS = 1
left a code Block like
<script type="text/javascript">
/*<![CDATA[*/
/*]]>*/
</script>
in the HTML header part instead of removing all of the JavaScript.
(issue imported from #M8527)
Files
Updated by Philipp Heine over 16 years ago
Is there somebody else with this problem?
Updated by Andreas Wagner over 16 years ago
Yes, I can confirm this. But it seems this line is not needed anymore. When I remove config.removeDefaultJS = 1, the default javascript is moved to an external file anyway.
Updated by Tomas Mrozek over 16 years ago
"But it seems this line is not needed anymore."
Not needed? Well, how can you get rid of the JavaScript then?
In my opinion, the setting is still needed and the JavaScript should be removed completely and not leave an empty block in the code.
Updated by Oliver Hader over 16 years ago
The attached patch solves this issue. The reason was, that the script tag was added for inline JavaScript, even when there wasn't any.
Updated by Steffen Kamper over 16 years ago
and old behaviour was
page.config.removeDefaultJS = 1
but it has to be
page.config.removeDefaultJS = external
who invited the cow? :-)
Updated by Tomas Mrozek over 16 years ago
"page.config.removeDefaultJS = external"
Is that a proposal or is this supposed to be already implemented?
Updated by Steffen Kamper over 16 years ago
Updated by Oliver Hader over 16 years ago
But the "old behaviour" is still valid:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/7/3/
Updated by Steffen Kamper over 16 years ago
but only in "compatibility mode" ;-)
Updated by Tomas Mrozek over 16 years ago
OK...
"page.config.removeDefaultJS = 1" removes the JavaScript but leaves empty JavaScript code.
"page.config.removeDefaultJS = external" moves the JavaScript into a temporary file and includes that file.
The question is: How do you get rid of the JavaScript altogether so as to get the old behaviour?
Updated by Oliver Hader over 16 years ago
Tomas: What do you want to get rid of? Of the emptry script tag? If so, test the attached patch.
Updated by Tomas Mrozek over 16 years ago
Tested. Your patch works. +1
Thanks!
I guess I got totaly confused by Steffen's comments.
Updated by Steffen Kamper over 16 years ago
sry for the confusion. It was my mistake as i remembered struggling with this setting a while ago ...
Updated by Oliver Hader over 16 years ago
- TYPO3_4-2 (rev. 3759)
- Trunk (rev. 3760)