Project

General

Profile

Actions

Bug #17027

closed

GMENU imgNameNotRandom doesn't work with special=language

Added by Ralf Hettinger over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-02-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The title tells it all.

The reason for this behaviour is that a menu using imgNameNotRandom relies on the page ids, which are not necessarily unique for a language menu - actually they probably very rarely are.
This might be true for other HMENU "special" properties as well: Those differ by the variable $key in function tslib_gmenu::writeMenu of class.tslib_menu.php

Attached patch solves the problem by adding the key to the JS variable name for an image but not the "random" md5 string.

Patched against typo3/sysext/cms/tslib/class.tslib_menu.php

(issue imported from #M5053)


Files

class.tslib_menu.php.diff (759 Bytes) class.tslib_menu.php.diff Administrator Admin, 2007-02-22 18:53
class.tslib_menu.php.diff2 (1.06 KB) class.tslib_menu.php.diff2 Administrator Admin, 2007-02-23 18:29
0005053_4.0.patch (1.29 KB) 0005053_4.0.patch Administrator Admin, 2007-02-24 14:07
0005053_4.1.patch (1.18 KB) 0005053_4.1.patch Administrator Admin, 2007-02-24 14:07
Actions #1

Updated by Ralf Hettinger over 17 years ago

Addendum: The described problem is also an issue with TMENU and beforeImg/beforeROimg set.

Please use class.tslib_menu.php.diff2 to solve the problem for GMENU as well as TMENU.

Actions #2

Updated by Oliver Hader over 17 years ago

I can confirm this issue.
If you have two items on the same page linking to the same page-id, the rollover won't work anymore, thus imgNamePrefix has to be used additonally.

e.g.

10 = HMENU
10 {
special = directory
special.value = 123
1 = GMENU
1 {
imgNameNotRandom = 1
imgNamePrefix = first
...
} # copy the first GMENU
20 < 10.10
20.1.imgNamePrefix = second

}

Actions #3

Updated by Oliver Hader over 17 years ago

I just added two patch versions for the 4.1 and 4.0 branch.

Actions #4

Updated by Ralf Hettinger over 17 years ago

Thank You for the patches, Oliver.

"[...] thus imgNamePrefix has to be used additonally. [...]"

Just commenting: Without patching, this won't solve the issue either for special=language, since the imgNamePrefix will be the same for all language menu items.

Actions #5

Updated by Oliver Hader over 17 years ago

You're right. A RFC was sent to the core developer list.

Actions #6

Updated by Oliver Hader over 17 years ago

Committed to SVN
  • TYPO3_4-1 (rev. 2390)
  • Trunk (rev. 2391)
Actions

Also available in: Atom PDF