Project

General

Profile

Actions

Bug #28640

closed

TMENU_LAYERS does not always create unique IDs for the third level

Added by Kurt Gusbeth almost 13 years ago. Updated about 11 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2011-08-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

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:

<div id="Menu1e532b0" style="z-index:9995; position:absolute;visibility:hidden;"><div class="menu1_main2"><a href="archiv.html" title="Archiv" onfocus="blurLink(this);">Archiv</a></div></div>
<div id="Menu1e532b0" style="z-index:9993; position:absolute;visibility:hidden;"><div class="menu1_main2"><a href="meldungen1.html" title="Meldungen" onfocus="blurLink(this);">Meldungen</a></div></div>
<div id="Menu1e532b1" style="z-index:9992; position:absolute;visibility:hidden;"><div class="menu1_main2"><a href="meldungen2.html" title="Meldungen" onfocus="blurLink(this);">Meldungen</a></div></div>

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.


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #21388: typo3temp got filled with thousands of javascript_* filesRejected2009-10-28

Actions
Related to TYPO3 Core - Task #46358: Separate ext:statictemplates code from coreClosed2013-03-16

Actions
Is duplicate of TYPO3 Core - Bug #24367: changes in tmenu_layers.php broke TMENURejected2010-12-19

Actions
Is duplicate of TYPO3 Core - Bug #26739: TMENU_LAYERS produces identical layer IDsRejected2011-05-10

Actions
Actions

Also available in: Atom PDF