Issue Bug Rejected

#28640TMENU_LAYERS does not always create unique IDs for the third level

Kurt Gusbeth 08/01/11, 13:37 updated 04/01/13, 11:45

Description

TMENU_LAYERS creates not unique IDs, if I use 2 TMENU_LAYERS menues.
Example:
temp.MENU_MAIN = HMENU
temp.MENU_MAIN {
entryLevel = 1
}
temp.MENU_MAIN.1 = TMENU_LAYERS
temp.MENU_MAIN.1 {
layerStyle = position:absolute;visibility:hidden;
lockPosition = x
…
}
temp.MENU_MAIN.2 = TMENU_LAYERS
temp.MENU_MAIN.2 {
layerStyle = position:absolute;visibility:hidden;
lockPosition = y
…
}
temp.MENU_MAIN.3 = TMENU
temp.MENU_MAIN.3 {
…
}
The IDs for the third level are not unique, if there are more entries/layers to display in the second and third level.
Example for the third level:



I have found a solution to fix this bug. The WMid makes the problems.
File: typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php
The value for “$this->WMid” should contain more values.
I dont know which values so I have added a rand:

function extProc_init() {
$this->WMid = trim($this->mconf[‘layer_menu_id’]) ? trim($this->mconf[‘layer_menu_id’]).rand(0,99) . ‘x’ : substr(md5(‘gl’ . serialize($this->mconf)), 0, 6).rand(0,99);

Note: the problem occurs not always. Some typo3 installations generate always a correct WMid.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.