Using 4.3.9
I inserted an inline script meant to hold search hits in file:scripts.post.tpl, enclosed in literal tags and starting with
But it renders as
But is otherwise unchanged... my later script can't find it obviously.
What is responsible for changing this and can it be bypassed?
Hello,
That would be CS-Carts parser. It removes the scripts from the original location and puts them all the way in the back of the dom content. This can be disabled in config.local.php (at least, a few months ago I was able to).
Kind regards,
Hello,This can be disabled in config.local.php (at least, a few months ago I was able to).
Setting in config.local.php
'dev_js' => true
Does solve the problem, so thanks for that.
I'm generally happy for most of the scripts to be moved to the bottom and/or combined though, so I'd rather find a way to simple get this one script to be 'un-parsed'.... or find the function that does this and see if I can get it to not mess with the 'type' and 'id'.
Alternatively, you can use a data-no-defer attribute in the script tag which will leave it in place. That is much better than having your whole site run in development mode for JS. I.e.
But curious why you need the id of a script tag versus a variable?
Alternatively, you can use a data-no-defer attribute in the script tag which will leave it in place. That is much better than having your whole site run in development mode for JS. I.e.
But curious why you need the id of a script tag versus a variable?
The data-no-defer tag does not work in this case, not sure why, but it will get removed as well.
If WYSIWYG editor is used in the textarea, try to install our free Full CKeditor addon. It should help