Bug #26739
closedTMENU_LAYERS produces identical layer IDs
0%
Description
When creating a nested TMENU_LAYERS menu the function extProc_init in tmenu_layers.php produces identical IDs for sub-layers. I guess this is the case if the configuration of e.g. level 2 and 3 are identical.
This fixes the problem:
instead of:
$this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']) . 'x' : substr(md5('gl' . serialize($this->mconf)), 0, 6);
use:
$random = rand(1,100);
$this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']) . 'x' : substr(md5('gl' . $zufall.random($this->mconf)), 0, 6);
Updated by Markus Rathmayr over 13 years ago
Sorry, error in the replacement code:
$random = rand(1,100);
$this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']) . 'x' : substr(md5('gl' . $random.serialize($this->mconf)), 0, 6);
Updated by Markus Klein over 13 years ago
Sounds reasonable.
You can directly submit this to our review system.
https://review.typo3.org/
Further information about posting change requests are documented in the wiki: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Updated by Oliver Hader over 13 years ago
- Target version changed from 4.5.3 to 4.5.4
Updated by Björn Pedersen over 13 years ago
Random values are not good, as there will be temp file flooding. See http://forge.typo3.org/issues/21388
Updated by Thorsten Kahler over 13 years ago
- Target version changed from 4.5.4 to 4.5.5
Updated by Oliver Hader over 13 years ago
- Target version changed from 4.5.5 to 4.5.6
Updated by Andreas Wolf about 13 years ago
- Category set to Content Rendering
- Status changed from New to Accepted
- Complexity set to easy
I would also rather go for some kind of internal counter mechanism here, which creates predictable ids - thus avoiding the temp flooding problem.
Could anybody provide a patch for that?
Updated by Chris topher about 13 years ago
- Target version changed from 4.5.6 to 4.5.8
Updated by Ernesto Baschny almost 13 years ago
- Target version changed from 4.5.8 to 4.5.12
Updated by Kurt Gusbeth over 11 years ago
My solution was this one:
$this->WMid = trim($this->mconf['layer_menu_id']) ? trim($this->mconf['layer_menu_id']).$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] . 'x' : substr(md5('gl' . serialize($this->mconf)), 0, 6).$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'];
Updated by Christian Kuhn over 11 years ago
- Status changed from Accepted to Rejected
With 6.1 issue #46358, the _layers menus where moved to statictemplates, and statictemplates was removed from core afterwards. This issue won't be solved in the core anymore.