Project

General

Profile

Actions

Bug #26739

closed

TMENU_LAYERS produces identical layer IDs

Added by Markus Rathmayr over 13 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2011-05-10
Due date:
% Done:

0%

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

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);


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #28640: TMENU_LAYERS does not always create unique IDs for the third levelRejected2011-08-01

Actions
Actions #1

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);

Actions #2

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

Actions #3

Updated by Oliver Hader over 13 years ago

  • Target version changed from 4.5.3 to 4.5.4
Actions #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

Actions #5

Updated by Thorsten Kahler over 13 years ago

  • Target version changed from 4.5.4 to 4.5.5
Actions #6

Updated by Oliver Hader over 13 years ago

  • Target version changed from 4.5.5 to 4.5.6
Actions #7

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?

Actions #8

Updated by Chris topher about 13 years ago

  • Target version changed from 4.5.6 to 4.5.8
Actions #9

Updated by Ernesto Baschny almost 13 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #10

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'];

Actions #11

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.

Actions

Also available in: Atom PDF