Closed Bug 53708 Opened 26 years ago Closed 26 years ago

links loads wrong page into frame / link doesn't load page

Categories

(Core :: DOM: Navigation, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: gilles+mozilla, Assigned: pollmann)

References

()

Details

(Whiteboard: [nsbeta3-][rtm++][dogfood+] fix in hand)

Attachments

(3 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20000921 BuildID: 2000092120 At the mentionned url, there is a page divided in two frames. One is on the left with links in it. Whatever link you click on, it always reload the same page in the right frame. Reproducible: Always Steps to Reproduce: 1. Go to the url 2. Click on the left links Actual Results: Always the same page in the right frame Expected Results: Different page in the right frame
verified with 092208 builds. looks like relative URLs not functioning in Frames
Assignee: asa → pollmann
Status: UNCONFIRMED → NEW
Component: Browser-General → HTMLFrames
Ever confirmed: true
QA Contact: doronr → petersen
nominating for nsbeta3 and/or rtm
Keywords: nsbeta3, rtm
I've seen this, too, on some company intranet pages. Adding myself to Cc list.
is 53975 related to this? marking this dogfood, this does hinder using the product on frame-related sites.
Keywords: dogfood
The workaround would be to open to a new window, but that would cause a lot of open windows :-) I'll mark dogfood +. (If this is already nominated for nsbeta3 and hasn't been minused (triaged) yet, there is no need to nominate for rtm also :-)
Whiteboard: [dogfood+]
I reduced this to a simpler test case. This problem may be similar to bug 48382. And then again, maybe not, who knows? ;) Initially we have this frameset: entrance.html menu.html "menu" foo_f.html "main" foo.html "title" foo.html "sub" We then click on a link in the frame "menu" that targets frame "main" with the page "bar_f.html". The expected result is this: entrance.html menu.html "menu" bar_f.html "main" bar.html "title" bar.html "body" bar.html "sub" The load of page "bar_f.html" into the frame "main" proceeds as expected. However, when the subframes of "bar_f.html" load, things go awry. In nsDocShell::LoadURI, we detect that this is a session history load, and substitute the pages that were displayed previously "foo.html" in place of "bar.html" for the first two frames. We end up with this: entrance.html menu.html "menu" bar_f.html "main" foo.html "title" <-------- wrong page loaded in this frame foo.html "body" <-------- wrong page loaded in this frame bar.html "sub" It seems like there are two problems: 1) We are detecting the load of the new page "bar.html" into the top two frame as a session history load. It seems we are being too eager in our detection of what is a session history load. That's what makes me think this may be a dup of bug 48382. Since this seems so closely related to 48382, I'm handing this to Nisheeth. I'm more than willing to pitch in though, so just drop by... I'll attach the reduced test case momentarily.
Assignee: pollmann → nisheeth
Component: HTMLFrames → History
OS: Windows NT → All
Hardware: PC → All
Summary: links always on same page in frame → links loads wrong page into frame (first loaded page)
There was no second problem, other than, as everyone knows, Nisheeth doesn't have enough critical bugs. ;)
*** Bug 53975 has been marked as a duplicate of this bug. ***
Please also test bug 53975 when closing this bug. Thanks!
*** Bug 49857 has been marked as a duplicate of this bug. ***
Okay, think I'm getting a handle on this one... The check made in nsDocShell::LoadURI here isn't sufficient: if (!shEntry && loadType != LOAD_NORMAL_REPLACE) { Even adding the (mCurrentURI == nsnull) as in bug 48382 won't catch this case. The problem is that in this case, we have nested framesets: a b c1 c2 And we're targetting a load a b. The LSHE for b will not be null when the new loads for c1 and c2 come in because b is indeed loading a new document. This causes us to wrongly detect that we are in a session history restoration and load the URLs that session history has stored for us. There are probably a couple of ways of fixing this. One might be to set a flag somewhere in session history or the root docshell when the load is driven by session history. Another might be to make nsDocShell::CloneAndReplace prune off the children of a subframe when it comes in for a new load (it currently copies the children from previous session history entry for the subframe over as children of the new session history entry for the subframe) I'll try my hand at the second fix to see if that clears things up...
Yep, that second fix works like a charm. I'll attach a patch (it's really just moving a right brace down a few lines... (snagging so Nisheeth can relax)
Assignee: nisheeth → pollmann
I tested this fix on the reduced test case and all of the bugs I marked as duplicates of this bug earlier today - all seem okay! :)
Status: NEW → ASSIGNED
Whiteboard: [dogfood+] → [dogfood+] fix in hand
pollman - when is this going to be checked in?
I want to try out the patch. Please hold on.
The changes look good to me.
Eric, Can you remove some of the commented out code in that function. There is a version of CloneAndReplace() inside a #if 0. Please take that out also if possible. Thanks, Radha
Doron, this is not going to make beta3 - maybe (hopefully) for RTM.
Latest patch looks good to me
pdt? +/-? However, if this won't make it, I suggest rtm+. adding approval keyword (perhaps Radha?). Sorry for pressing this,just that frames really should be working.
Keywords: approval
I have already provided my review comments. I think pollmann should talk to respective people and check this in to trunk and later to branch.
Doron, I think it's too late to get this in to nsbeta3, but I'll try hard to get it in for rtm.
marking rtm+.
Whiteboard: [dogfood+] fix in hand → [rtm+][dogfood+] fix in hand
Marking [rtm need info] Waiting for patch to be attached, review + super-review.
Whiteboard: [rtm+][dogfood+] fix in hand → [rtm need info][dogfood+] fix in hand
Marking nsbeta3- since we are past nsbeta3
Whiteboard: [rtm need info][dogfood+] fix in hand → [nsbeta3-][rtm need info][dogfood+] fix in hand
patch is attached, have review and super-review, waiting on approval
*** Bug 55782 has been marked as a duplicate of this bug. ***
The frame loading behaviour seems correct but I see problems with the session history. For example, load "http://www.netscape.com", then load "http://www.dec.sakura.ne.jp/~hiziri/entrance.html", click on the "Renn's Room" link, hit the back button and you end up back at www.netscape.com. If session history problem is another bug, you can have my module owners approval to check-in.
Adam, it's bug 46828. BTW I had found 4 bugs releated to same frame bug.
Eric, I think you should get a rtm+ (or your boss should put it) on the status board to get the PDT approval. I'm not sure PDT looks in to dogfood+ bugs.
Thanks for the a=Adam, marking this rtm+. The fix is a one-line change in nsDocShell. It is low risk, and fixes a number of problems with clicking on links not working or loading apparently random pages into frame (or apparently not loading any new page at all when it should). This is a serious bug because to a user it looks like "Click on link does nothing" or "Click on link goes to wrong url".
Whiteboard: [nsbeta3-][rtm need info][dogfood+] fix in hand → [nsbeta3-][rtm+][dogfood+] fix in hand
*** Bug 55946 has been marked as a duplicate of this bug. ***
Priority never got set. Since this is basic browser functionality (clicking on a link loading the right URL), marking P1 - hope PDT sees it now. :)
Priority: P3 → P1
Summary: links loads wrong page into frame (first loaded page) → links loads wrong page into frame / link doesn't load page
The updated patch is not a one line change. Perhaps the wrong patch was attached to the bug? (This patch appears to include significant cleanup that might be masking the "one line" you're talking about.) Please provide the patch that shows just one line being changed.
Whiteboard: [nsbeta3-][rtm+][dogfood+] fix in hand → [nsbeta3-][rtm need info][dogfood+] fix in hand
(and then change the [rtm need info] to [rtm+] so this shows back on PDT queries for bugs to review. Thanks!)
PDT, Please look at patch #2 "proposed fix(CloneAndReplace prunes children of subframe". It has the one line fix. The third patch just masks the original fix. Please approve it. This really has to be checked in for frameset pages to work right. Making rtm+ once again.
Whiteboard: [nsbeta3-][rtm need info][dogfood+] fix in hand → [nsbeta3-][rtm+][dogfood+] fix in hand
*** Bug 56032 has been marked as a duplicate of this bug. ***
*** Bug 56023 has been marked as a duplicate of this bug. ***
[rtm++] for the small patch only. This is not the time for code cleanup on the branch, but check in the dead-code-removal on the trunk.
Whiteboard: [nsbeta3-][rtm+][dogfood+] fix in hand → [nsbeta3-][rtm++][dogfood+] fix in hand
> but check in the dead-code-removal on the trunk This was done last night I'll check the smaller patch into the branch! :)
Checked the smaller patch into the branch. To verify the fix: Go to http://www.santineassociati.com, (or if you don't mind, um, adult anime, http://www.dec.sakura.ne.jp/~hiziri/entrance.html ) At http://www.santineassociati.com: Click on "Azienda" in the top frame The two frames that load below should both start with L'azienda At http://www.dec.sakura.ne.jp/~hiziri/entrance.html Click on "Free BBS" in the left frame The frames that load to the right should start with "Free BBS" Thanks!
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
This is indeed fixed in the branch build of Windows and Linux (2000101212). Still waiting for Mac branch (Sept 12th ) to verify.
Fixed in the Mac Sept 12 build (2000101214).
Keywords: vtrunk
*** Bug 56715 has been marked as a duplicate of this bug. ***
Verified Fixed on trunk builds linux 101808 RedHat 6.2 win32 101804 NT 4 mac 101804 Mac OS9 Setting bug to Verified and removing vtrunk keyword
Status: RESOLVED → VERIFIED
Keywords: vtrunk
Component: History: Session → Document Navigation
QA Contact: chrispetersen → docshell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: