Bug #14757
closedJSmenu with RealURL is broken (jsfunc.menu.js)
0%
Description
It looks like the bugfix in bug 0000649 is broken in 3.8. The baseurl is inserted twice thereby breaking the link.
I have tried removing the fix and it works in Firefox 1.0.4 and IE 6 with RealURL. Havn't tried other configurations.
(issue imported from #M1111)
Updated by Philipp Steinmetzger over 19 years ago
Hi cmelchior!
I've the same baseurl-twice error in 3.8.0 final. But I didn't understand yet, how you fixed the problem. I also noticed the bugreport 0001167 (the same code line), but don't understand the interaction of this two problems yet.
Updated by Simon Ihmig over 19 years ago
I had the same problem and found a quick fix. In jsfunc.menu.js, function JSactivate there is a check for the base tag, that is required by real url, but it doesn't check if the linked url's are absolute or relative. The following replacement code adds this check, maybe someone can integrate it for the next releases!?
function JSactivate(level) {
var selectorBox = document[this.formname]["selector"+level];
var entryID = selectorBox.options[selectorBox.selectedIndex].value;
if (this.entry[entryID]) {
this.writeOut(this.entry[entryID].child,this.entry[entryID].openID,level+1);
if (this.entry[this.entry[entryID].parent]) {
this.entry[this.entry[entryID].parent].openID = entryID;
}
if (this.entry[entryID].url) {
if (document.getElementsByTagName("base")[0].href != "" && this.entry[entryID].url.substr(0,5) != "http:" && this.entry[entryID].url.substr(0,6) != "https:") {
this.entry[entryID].url = document.getElementsByTagName("base")[0].href + this.entry[entryID].url;
}
Updated by Matthias Nagl about 19 years ago
Simon's fix works for me.
Matthias Nagl
Updated by Matthias Nagl almost 19 years ago
Why hasn't this bugfix been integrated in 3.8.1?? With the little changes from Simon the bug would be fixed!!
Matthias
Updated by Sebastian Kurfuerst almost 19 years ago
Hi Matthias,
please calm down. The core devs are doing all the bugfixing work in their spare time, and nobody noticed this patch beforehand - and there were more important issues as well.
Greets, Sebastian
Updated by Matthias Nagl almost 19 years ago
Sorry, my note wasn't meant as an insult - I appreciate the work of every os-developer and understand that some minor things as this bug are overlooked. I just was puzzled after the upgrade to see again a bug that I had almost forgotten and wanted to remind someone responsible that he could easily close it.
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
I cannot fix this issue because I am no expert in this area at the moment - But I will set this bug to "acknowledged".
Greets, Sebastian
Updated by Matthew over 18 years ago
This bug seems not to be entirely fixed in 4.0. The base check is now made for http:// but the https:// is missing in my 4.0beta4 file 'jsfunc.menu.js'
Matthew
PS.
This is the magic line:
if (document.getElementsByTagName("base")[0].href != "" && this.entry[entryID].url.substr(0,5) != "http:" && this.entry[entryID].url.substr(0,6) != "https:") {
this.entry[entryID].url = document.getElementsByTagName("base")[0].href + this.entry[entryID].url;
}
Updated by Benni Mack over 14 years ago
According to the source code of the curren TYPO3 trunk (4.4), this fix is already included, so I'll close this one.
Also: I have JSMenu running on a few sites with RealURL and no problems whatsoever.