Bug #18861
closed
config.removeDefaultJS=1 leaves empty script block
Added by Philipp Heine about 16 years ago.
Updated over 15 years ago.
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
Is there somebody else with this problem?
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.
"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.
The attached patch solves this issue. The reason was, that the script tag was added for inline JavaScript, even when there wasn't any.
and old behaviour was
page.config.removeDefaultJS = 1
but it has to be
page.config.removeDefaultJS = external
who invited the cow? :-)
"page.config.removeDefaultJS = external"
Is that a proposal or is this supposed to be already implemented?
but only in "compatibility mode" ;-)
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?
Tomas: What do you want to get rid of? Of the emptry script tag? If so, test the attached patch.
Tested. Your patch works. +1
Thanks!
I guess I got totaly confused by Steffen's comments.
sry for the confusion. It was my mistake as i remembered struggling with this setting a while ago ...
Committed to SVN:
- TYPO3_4-2 (rev. 3759)
- Trunk (rev. 3760)
Also available in: Atom
PDF