Bug #44629
closedJS Error in IE and inline tceforms
0%
Description
If you use tceforms inline elements which uses any kind of javascript code (which will be retrieved via AJAX and an json-response (> "headerData")) , the commings JS-Code could not be evaluated by an internter explorer (tested in native IE8 and native IE9)!
The evaluation of the js code fails in "jsfunc.inline.js" in line 196, because the comming code starts an ends with HTML-commtnets (""). When the comments are removed, the inline elements works very well.
For examplte the comming RTE inside an inline element won't be initialized!
The "" wrap arround the JS-code is generated by t3lib_pagerenderer (see inlineJavascriptWrap). Why we need the comments today? The easiest way is to remove the comments inside the t3lib_pagerenderer-class. A other solution is to replace the comments in t3lib_tceforms_inline::getHeadTags inside the foreach-loop:
[code]foreach ($tags as $tagData) {
- $tagName = $parseObj->getFirstTagName($tagData);
$innerHTML = $parseObj->removeFirstAndLastTag($tagData);
if ($tagName === 'SCRIPT')
{
$innerHTML = trim($innerHTML);
$innerHTML = preg_replace('/^\<\!\-\-/', '', $innerHTML);
$innerHTML = preg_replace('/\/\/\s*\-\-\>$/', '', $innerHTML);
}*
$tagAttributes = $parseObj->get_tag_attributes($parseObj->getFirstTag($tagData), TRUE);
$headTags[] = array(
'name' => $tagName,
'attributes' => $tagAttributes[0],
'innerHTML' => $innerHTML,
);
}
[/code]
This issue was tested in TYPO3 4.7
Updated by Georg Ringer almost 10 years ago
- Status changed from New to Needs Feedback
- Is Regression set to No
can you please retest in current versions? seems to be fixed.
Updated by Riccardo De Contardi over 9 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.