Issue Bug Closed

#33977Index of count_HMENU_MENUOBJ not incremented in GMENU with linked pictures

Gisèle Wendl 02/16/12, 12:37 updated 06/15/15, 10:52

Description

I make a Menu using COA and then I insert a GMENU and a TMENU. I use count_HMENU_MENUOBJ for setting up my custom JS-Rollovers.
It works fine for the TMENU, but in the GMENU the counter I use, count_HMENU_MENUOBJ, is always at the same value, 0.
GMENU Item is build like this:
@NO = 1
NO {
altImgResource.import = uploads/media/
altImgResource.import.field = media
altImgResource.import.listNum = 0
XY = 20,20
format = jpg
quality = 88
10 = IMAGE
10.file = {$filepaths.css}icons/itoctoc20ia.png
10.offset = 0,0
imgParams = class=“mmlicon“
ATagTitle.field = description // title
wrap = |
allWrap = |
allStdWrap = |
allStdWrap.dataWrap (
<div id=“mlleftframe2NO{register : count_HMENU_MENUOBJ}”…|…
)
}@

Here the GIFBUILDER is not invoked.
In file class.tslib_menu.php count_HMENU_MENUOBJ gets +1 only in the code-part where the GIFBUILDER is invoked.
But this is only conditionally the case.
In the present example the condition is not satisfied.

Proposition:

Comment out the lines
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++; $GLOBALS['TSFE']->register['count_MENUOBJ']++;

in function makeGifs($conf, $resKey)

and insert these lines in
function writeMenu() of the GMENU
in the loop
@for ($key=0;$key<$this->WMmenuItems;$key++) {
if ($this->result[‘NO’][$key][‘output_file’]) {
@

My modified version of class.tslib_menu.php is attached to this post.

Reviews 0

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