[TYPO3] JSMENU config files? / absolute href

Matthew Manderson matthew at manderson.co.uk
Wed Mar 8 21:54:34 CET 2006


> JSMENU is prefixing my <option> links with double absolutes eg.
> http://www.site.com/http://www.site.com/en/delivery/usa.html
> Any idea where I can look to hack the JSMENU to get rid of the prefix as
> the rest of the site is working fine with config.baseURL ?

Well I found my hack...hope it helps someone else.

/typo3/t3lib/jsfunc.menu.js

contains the code that generates the url.

The final function JSactivate(level) contains a line to add the base href to
it. So I commented it out.

// this.entry[entryID].url = document.getElementsByTagName("base")[0].href +
this.entry[entryID].url;

This fixed it for me.

It turns out this was a bug in 3.9 and lower becasue checking this in
4.0beta4 there is a extra check added to look for the url with an existing
absolute prefix 'http://'

So for my hack I have included this check in my 3.9 installation!

However it also highlights that it is not checking for https:// connections
either!

Bug report filed.

Matthew



More information about the TYPO3-english mailing list