Bug 269702 - URL bar does not change when clicking back
Summary: URL bar does not change when clicking back
Status: RESOLVED UPSTREAM
Alias: None
Product: rekonq
Classification: Applications
Component: general (show other bugs)
Version: latest git snapshot
Platform: Compiled Sources Linux
: NOR major
Target Milestone: 0.8
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 16:08 UTC by Jonathan Riddell
Modified: 2011-09-11 09:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
working testcase (1.10 KB, application/octet-stream)
2011-04-02 18:05 UTC, Felix Rohrbach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2011-03-29 16:08:09 UTC
Version:           latest git snapshot (using KDE 4.6.1) 
OS:                Linux

On some websites when I click back the address in the URL bar does not change.  Clicking back again changes it to an off by one address. 

Reproducible: Always

Steps to Reproduce:
Go to http://cdimage.ubuntu.com/ click kubuntu then daily
click back
click back again

Actual Results:  
On the first back, the URL bar remains at /kubuntu/daily/
On the second back, the URL bar remains at /kubuntu/

Expected Results:  
On the first back, the URL bar should be /kubuntu/
On the second back, the URL bar should be /
Comment 1 Rohan Garg 2011-03-29 16:28:12 UTC
Confirmed, targeting to 0.7
Comment 2 Andrea Diamantini 2011-03-29 18:25:10 UTC
Sorry, this does not happen here.
Comment 3 Felix Rohrbach 2011-04-02 15:59:20 UTC
This may be connected to bug 260844. I can confirm this on rekonq and arora, so I guess this is an upstream bug.
Comment 4 Felix Rohrbach 2011-04-02 18:05:23 UTC
Created attachment 58521 [details]
working testcase

I did some investigations on that bug.

When I click the back button, MainWindow::openPrevious is called. Here, a QWebHistoryItem is created, which has the right url. With this item, QWebHistory::goToItem is called.

When MainView::webViewUrlChanged(const QUrl&) is called by the QWebView::urlChanged signal, the url has changed to the wrong one (e.g. before "http://cdimage.ubuntu.com/kubuntu/", now "http://cdimage.ubuntu.com/kubuntu/daily/").

I could not reproduce this with a similar testcase (attached), so somewhere that url was changed or my testcase is different from this situation.

My system:
KDE 4.6.1
Qt 4.7.2
GCC 4.5.2
Arch Linux 64bit
Comment 5 Davor Cubranic 2011-06-14 20:18:06 UTC
I can reproduce this with rekonq 0.7.0 (Kubuntu Natty) while working through the Rails "getting started" guide (http://guides.rubyonrails.org/getting_started.html). Halfway through section 4.3 of the guide, I go through the following set of URLs:

1. localhost:3000 (Error: no route matches "/")
2. localhost:3000/home (Error: no route matches "/home")
3. localhost:3000/home/index (valid page is rendered)

When I go back from the third step (either with alt-left or by clicking on the back button in the toolbar), the page is rerendered, but the location bar lags by one step. (I.e., when I go back from step 3. to 2., it's still showing "localhost:3000/home/index", and when I go back to step 1., it shows "localhost:3000/home".)
Comment 6 Davor Cubranic 2011-06-14 20:44:19 UTC
In my test case, the key is that a page returns an error (404 for step 1 and 2). This is confirmed by the fact that when I add a route so that "localhost:3000" matches a valid page, only going back from step 3 to 2 fails to update the location bar, because that page is still a 404. Going back to step 1 is now a valid page (200), and the location is updated correctly.
Comment 7 Andrea Diamantini 2011-09-10 16:51:40 UTC
Targetting 0.8, but I really never could reproduce it. Can you test it again, please?
Comment 8 Felix Rohrbach 2011-09-10 16:56:43 UTC
I'm still able to reproduce it.
Comment 9 Andrea Diamantini 2011-09-11 09:47:59 UTC
Ah.. found the culprit! I can reproduce it against QtWebkit 2.0.x but NOT against QtWebKit 2.2.
Targetting as RESOLVED -> UPSTREAM.