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 #1

Updated by Clemens Riccabona almost 16 years ago

In addition i want to point out once again: document.onload is in IE throughout problematic, if you do not use it with a try-catch and probably some timeout in the catch, because of the not really proper implemented dom.load handler in IE.
And the IE is also not really patient with load-orders, where other browsers won't give you an error.

Actions #2

Updated by Clemens Riccabona almost 16 years ago

aehm, the file for the changes is:

typo3/sysext/cms/tslib/class.tslib_pagegen.php

Actions #3

Updated by Christian Kuhn over 14 years ago

Is this still true with 4.3 and the new pageRenderer?

Actions #4

Updated by Clemens Riccabona about 14 years ago

no, this does not appear with TYPO3 Versions 4.3 and 4.4

So this problem seems somehow 'solved'.

Actions #5

Updated by Christian Kuhn over 11 years ago

  • Status changed from New to Resolved
  • Target version deleted (0)

Seems to be solved.

Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF