[TYPO3-core] RFC #12506: Bug: JSMENU does not respect mount point overlays

Joerg Wagner [DigiLog] news.netfielders.de at digilog.de
Mon Nov 16 23:22:18 CET 2009


Hi Xavier,

 > I would suggest you posted a complete but minimal TS setup that
 > renders wrongly without patch and that is OK after applying your
 > patch...

here we go:

To reproduce the problem take these steps:
- In a virgin TYPO3...

- build a page tree like this:
P1
   P2
     P3
     P4
       P5
   P6
     P7

- use the TS setup below
(I assume that each page has a uid corresponding to its page number, 
otherwise you will have to modify the uids in page.35.special.value and 
page.45.special.value)

This will render four JSMENUs and a conventional text menu (for 
comparison). Use the conventional menu to navigate to all pages and see 
whether the dropdowns of each JSMENU will default to the current page 
and its rootline (if those are contained in that JSMENU).

The only JSMENU where this will always work correctly without the patch 
is the first one (because it starts at the root page, which is the only 
case in which the old isactive algorithm is correct). The other 3 
JSMENUS will NEVER default to anything (the dropdowns will always 
default to the empty entry).

With the patch, all JSMENUs will correctly default to the currently 
active page and its parents if possible.

Cheers,
Jörg

#---------- TS-SETUP START -------------------

page = PAGE
page.typeNum = 0

page.10 = TEXT
page.10.value = <br><b>JSMENU normal:</b><br>
page.15 = HMENU
page.15{
   1 = JSMENU
   1 {
     menuName = menu1
     levels = 3
     1.showActive = true
     2.showActive = true
     3.showActive = true
   }
}

page.20 = TEXT
page.20.value = <br><b>JSMENU using entryLevel=1:</b><br>
page.25 = HMENU
page.25{
   entryLevel=1
   1 = JSMENU
   1 {
     menuName = menu2
     levels = 3
     1.showActive = true
     2.showActive = true
     3.showActive = true
   }
}

page.30 = TEXT
page.30.value = <br><b>JSMENU in HMENU special=directory:</b><br>
page.35 = HMENU
page.35{
   special=directory
   special.value=2
   1 = JSMENU
   1 {
     menuName = menu3
     levels = 3
     1.showActive = true
     2.showActive = true
     3.showActive = true
   }
}

page.40 = TEXT
page.40.value = <br><b>JSMENU in HMENU special=list:</b><br>
page.45 = HMENU
page.45{
   special=list
   special.value=3,4
   1 = JSMENU
   1 {
     menuName = menu4
     levels = 3
     1.showActive = true
     2.showActive = true
     3.showActive = true
   }
}

page.90 = TEXT
page.90.value = <br><b>HMENU full menu (to compare against):</b><br>

page.95 = HMENU
page.95{
  1=TMENU
  1 {
    expAll=1
    NO=1
    NO{
      allWrap=|<br>
    }
    ACT<.NO
    ACT{
      stdWrap.wrap = <span style="font-weight: bold; color:#c00;">|</span>
   }
  }
  2<.1
  2.NO.allWrap=--&nbsp;|<br>
  2.ACT.allWrap=--&nbsp;|<br>
  3<.1
  3.NO.allWrap=----&nbsp;|<br>
  3.ACT.allWrap=----&nbsp;|<br>
  4<.1
  4.NO.allWrap=------&nbsp;|<br>
  4.ACT.allWrap=------&nbsp;|<br>
  5<.1
  5.NO.allWrap=--------&nbsp;|<br>
  5.ACT.allWrap=--------&nbsp;|<br>
}

#---------- TS-SETUP END -------------------





Xavier Perseguers schrieb:
> Hi,
> 
>> is there anything I can do to motivate you to review the two JSMENU 
>> patches I posted one week ago?
>>
>> Maybe:
>> - More details on a testing scenario (page tree, TS code)?
>> - Text description of what the patches do?
>> - SQL dump of a rudimentary TYPO3 installation containing everything 
>> to reproduce the two errors?
>>
>> Tracking down and correcting these bugs took me nearly two days so it 
>> would really be a pity not to use the results. As said the patches are 
>> thoroughly tested and I am convinced that they are complete in any 
>> aspect. Without these patches JSMENUs will not work in a rather large 
>> number of implementations as the original code is really quite buggy.
> 
> I would suggest you posted a complete but minimal TS setup that renders 
> wrongly without patch and that is OK after applying your patch...
> 


More information about the TYPO3-team-core mailing list