Bug 239040 - if no connection, rekonq does not display address in location bar
Summary: if no connection, rekonq does not display address in location bar
Status: RESOLVED FIXED
Alias: None
Product: rekonq
Classification: Applications
Component: general (show other bugs)
Version: 0.4.90
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Andrea Diamantini
URL:
Keywords:
Depends on:
Blocks: 237890
  Show dependency treegraph
 
Reported: 2010-05-27 19:45 UTC by Georges
Modified: 2010-09-04 10:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georges 2010-05-27 19:45:50 UTC
Version:           0.4.90 (using KDE 4.4.3) 
OS:                Linux

It happens fairly often for me that rekonq is started (session resume) while a network connection hasn't been established yet.

When this happens and I had tabs open, rekonq display an error that it couldn't open those websites and adds a "try again" button.
Now pressing try again works fine.

But my problem is that in such a situation the address is _not_ displayed in the location bar.
Hence when I happen to close rekonq and open it again I have still all the tabs but this time those tabs are just blank tabs with no failed to connect error or try again button.

Would it be possible to put the address in the location bar no matter if it succeeds to connect or not, solving the described problem ?

Reproducible: Didn't try

Steps to Reproduce:
1. open a website
2. close rekonq
3. disable all network connections
4. open rekonq
5. close rekonq
6. enable network connection
7. open rekonq

Actual Results:  
White page

Expected Results:  
Previous address(es) in location bar

OS: Linux (x86_64) release 2.6.34
Compiler: cc
Comment 1 Panagiotis Papadopoulos 2010-05-28 16:40:35 UTC
I can confirm this too with the latest git
Comment 2 Andrea Diamantini 2010-05-28 19:04:43 UTC
Is really this a "major" severity bug?
Targetting 0.5..
Comment 3 Georges 2010-05-28 19:12:56 UTC
(In reply to comment #2)
> Is really this a "major" severity bug?
> Targetting 0.5..

The definition for major was "causing data loss", and that's what it does :-)
I tend to keep my tabs open over sessions, and it happened several times already that I lost my open tabs and links for that matter due to this and it makes it hard to stick to using rekonq.

But that's my POV ... I guess you can decrease the severity level.
In any case thnx for looking into this and "fixing" it :-)
Comment 4 Panagiotis Papadopoulos 2010-05-28 20:00:04 UTC
imho easiest way to solve this would be to not clear the url bar's content, when the rekonq error page appears
Comment 5 Andrea Diamantini 2010-06-01 17:05:06 UTC
commit a9987de97f6d1904497316c4b93a0e56ee675c83
Author: Andrea Diamantini <adjam7@gmail.com>
Date:   Tue Jun 1 17:06:49 2010 +0200

    Fix error reporting
    
    BUG:239040

diff --git a/src/webpage.cpp b/src/webpage.cpp
index 4a8c8b6..c6e9c06 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -537,6 +537,8 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
         {
             mainFrame()->setHtml(errorPage(reply));
             _isOnRekonqPage = true;
+            Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(_loadingUrl);
+            Application::instance()->mainWindow()->updateActions();
         }
         break;
 
@@ -560,7 +562,7 @@ QString WebPage::errorPage(QNetworkReply *reply)
         return QString("Couldn't open the rekonqinfo.html file");
     }
 
-    QString title = i18n("Error loading: %1", reply->url().path());
+    QString title = i18n("Error loading: %1", reply->url().toString());
     QString urlString = reply->url().toString(QUrl::RemoveUserInfo | QUrl::RemoveQuery);
 
     QString iconPath = QString("file://") + KIconLoader::global()->iconPath("dialog-warning" , KIconLoader::Small);
Comment 6 Georges 2010-06-01 19:02:26 UTC
I'm afraid that does not fix the problem.

Steps to reproduce:
Open rekonq with two tabs.
Close rekonq
Disable network connection
Open rekonq
    The application title correctly contains the url which is supposed to be loaded, for both tabs
    The location bar of the first tab show the address of the second tab, whereas the location bar of the second is empty
    The error message on both tabs correctly display the url which should have been loaded

Closing and reopening rekonq results in there being two empty ( (Untitled) ) tabs with urls from the previous sessions being lost.
Comment 7 Andrea Diamantini 2010-06-02 03:11:02 UTC
George, your bug title was "if no connection, rekonq does not display address in location bar". And now it display address on error pages.

I cannot understand why you think that showing address in the urlbar can be related to the problem you are referring now. This second thing is quite impossible. I fear.
You basically want that everything typed in the urlbar will be recorded as "visited site". No way we can fix it.
Comment 8 Georges 2010-06-02 07:54:34 UTC
(In reply to comment #7)
> George, your bug title was "if no connection, rekonq does not display address
> in location bar". And now it display address on error pages.

It displays the address on the error page as you say, but not in the location (/url) bar as is the title of my bug report; well it does but not correctly as it seems as described in my previous post.


> I cannot understand why you think that showing address in the urlbar can be
> related to the problem you are referring now. This second thing is quite
> impossible. I fear.
> You basically want that everything typed in the urlbar will be recorded as
> "visited site". No way we can fix it.

I thought that showing the url in the location bar would make rekonq save the contents of the bar when it closes.
As it re-opens the number of tabs which were open before, but just empty, that tells me that I am not that off with my assumption ... but maybe I am :-)

Currently if you close rekonq and it was configured to re-open tabs as they were, it will happily re-open the websites you visited in your previous session, correct ?

What I am asking for, is that if there is no internet connection that rekonq displays the error as it does now, but also still remembers the sites it was supposed to open, so that when you close rekonq again and re-open it when the connection is back, it will open the sites.

Konqueror does that and at least firefox as well.

Is that really not possible to implement in rekoqn ?
Comment 9 James Dent 2010-06-02 08:04:37 UTC
I have this same problem. 

I connect to the internet through a wireless network, which takes perhaps ten seconds to be initialised. So, if had some tabs open in Rekonq when I shut down my previous KDE session, Rekonq is automatically launched when I log back in. But since this happens before internet connectivity has become available, the locations of the tabs I had open are lost.
Comment 10 Andrea Diamantini 2010-06-03 00:07:57 UTC
On Wednesday 02 June 2010 07:55:03 Georges wrote:
> https://bugs.kde.org/show_bug.cgi?id=239040
> 
> 
> 
> 
> 
> --- Comment #8 from Georges <gtoth trypill org>  2010-06-02 07:54:34 ---
> (In reply to comment #7)
> 
> > George, your bug title was "if no connection, rekonq does not display
> > address in location bar". And now it display address on error pages.
> 
> It displays the address on the error page as you say, but not in the
> location (/url) bar as is the title of my bug report; well it does but not
> correctly as it seems as described in my previous post.
> 
> > I cannot understand why you think that showing address in the urlbar can
> > be related to the problem you are referring now. This second thing is
> > quite impossible. I fear.
> > You basically want that everything typed in the urlbar will be recorded
> > as "visited site". No way we can fix it.
> 
> I thought that showing the url in the location bar would make rekonq save
> the contents of the bar when it closes.
> As it re-opens the number of tabs which were open before, but just empty,
> that tells me that I am not that off with my assumption ... but maybe I am
> :-)
> 
> Currently if you close rekonq and it was configured to re-open tabs as they
> were, it will happily re-open the websites you visited in your previous
> session, correct ?
> 
> What I am asking for, is that if there is no internet connection that
> rekonq displays the error as it does now, but also still remembers the
> sites it was supposed to open, so that when you close rekonq again and
> re-open it when the connection is back, it will open the sites.
> 
> Konqueror does that and at least firefox as well.
> 
> Is that really not possible to implement in rekoqn ?

I don't say it's impossible. I'm saying this is another bug.
And I probably don't have time to fix it for 0.5.

Anyway, please choose bugs titles reflecting the bug you are reporting, not the 
assumptions you did seeing it.

Regards,
Comment 11 James Dent 2010-06-04 08:09:05 UTC
Thanks, Andrea. As suggested, I've filed a separate bug for this: #240691.