Project

General

Profile

Actions

Bug #14757

closed

JSmenu with RealURL is broken (jsfunc.menu.js)

Added by old_cmelchior over 19 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2005-05-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #14474: JSMENU with realurl doesn't work in IEClosedAndreas Otto †2004-12-28

Actions
Related to TYPO3 Core - Bug #14795: JS Error with JSMENUClosedSebastian Kurfuerst2005-06-06

Actions
Actions #1

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.

Actions #2

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;
}

Actions #3

Updated by Matthias Nagl about 19 years ago

Simon's fix works for me.

Matthias Nagl

Actions #4

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

Actions #5

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

Actions #6

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.

Actions #7

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

Actions #8

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;
}
Actions #9

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.

Actions #10

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.4.0)
Actions

Also available in: Atom PDF