Project

General

Profile

Actions

Bug #19937

closed

additionalHeaderData in connection with xmenu_layers not in correct order

Added by Clemens Riccabona almost 16 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-01-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you have a xmenu_layers on your page, then you have a problem.
this causes multiple js errors on ie7 at least with the first load of the website.

This is because in the 'inline script' (which i externalize always with config.removeDefaultJS=external always) there are lots of calls to functions within the other inline stuff, which is written by the xmenu_layers.php, and in addition also calls to functions within jsfunc.layers.php.
And these scripts are included with
$GLOBALS['TSFE']->additionalHeaderData
and, in newer sources (at least in 4.2.0, didn't check previous versions) this is now BENEATH the inlinescripting positioned in head.
This causes ie7 to call functions which are not existing at the moment, e.g. if you move mouse while loading the page.

Especially this snippet in the inline code is quite problematic:

document.onmousemove=T3_onmousemoveWrapper;document.onmouseup=T3_onmouseupWrapper;document.onload=T3_onloadWrapper;function decryptCharcode(n,start,end,offset){n=n+offset;if(offset>0&&n>end){n=start+(n-end-1);}else if(offset<0&&n<start){n=end-(start-n-1);}

This bug can be solved by splitting this line (somewhere around 810++):

$GLOBALS['TSFE']->content.= chr(10).implode($GLOBALS['TSFE']->additionalHeaderData,chr(10)).'
</head>';

into:

$GLOBALS['TSFE']->content.= chr(10).implode($GLOBALS['TSFE']->additionalHeaderData,chr(10));
$GLOBALS['TSFE']->content.= '</head>';

and moving the resulting first line right before:

//add inline JS

somewhere around 750++

(issue imported from #M10301)

Actions

Also available in: Atom PDF