Bug #17023
closedJSMENU produces error if using baseurls
0%
Description
The JSMENU does not work with baseurls set i.e. in realURL enviroments
The reasons for this:
1. Array property for number of elements is not .size but .length in t3lib/jsfunc.menu.js
2. the $GLOBALS['TSFE']->baseUrlWrap() has to be applied to nonempty URLs in typo3/sysext/cms/tslib/class.tslib_menu.php. Otherwise the javascript-code will not work properly on menu entries with noLink=1 Instead of staying at the current url, the baseurl is loaded.
(issue imported from #M5048)
Files
Updated by Oliver Hader over 17 years ago
Could you please provide a small portion of TypoScript to reproduce and test this on your patch? Thanks!
Updated by Jens Köster over 17 years ago
lib.pulldownNav = HMENU
lib.pulldownNav {
special = directory
special.value = 86
1=JSMENU
1 {
levels = 3
1.noLink = 1
2.noLink = 1
3.noLink = 1
}
}
config{
simulateStaticDocuments = 0
baseURL = http://baseurl
tx_realurl_enable = 1
prefixLocalAnchors = all
}
- this config block causes the problem - check out the generated javascript
- eid1=JSmenu.add(0,0,0,'title','[you will find the baseurl here]','');
Updated by Oliver Hader over 17 years ago
Your patch fixed the problem. Thanks!
However, I added a new patch with some cleaning in the affected JavaScript part.
I'm not sure if it could happen in a JSMENU that an item is not linked but requested to use the baseURL?
The call baseUrlWrap was last changed by Bernhard in revision 1111
(see http://svn.t3.digitaldistrict.de/cgi-bin/trac.cgi/changeset/4184 ).
Updated by Oliver Hader over 17 years ago
- TYPO3_4-1 (rev. 2393)
- Trunk (rev. 2394)