Bug #17023
closed
JSMENU produces error if using baseurls
Added by Jens Köster over 17 years ago.
Updated about 16 years ago.
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
Could you please provide a small portion of TypoScript to reproduce and test this on your patch? Thanks!
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]','');
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 ).
Committed to SVN
- TYPO3_4-1 (rev. 2393)
- Trunk (rev. 2394)
Also available in: Atom
PDF