Ticket #3500 (closed defect: fixed)

Opened 13 months ago

Last modified 8 months ago

Better error message when a page can not be loaded

Reported by: erikos Owned by: humitos
Priority: Normal Milestone: 0.98
Component: Browse Version: Git as of bugdate
Severity: Unspecified Keywords: patch
Cc: manuq, humitos Distribution/OS: Unspecified
Bug Status: New

Description

At the momet we do get the standard error message. Have the message translated etc.

Attachments

Browse_not_connected_to_internet_mesage.png Download (56.7 KB) - added by garycmartin 8 months ago.
Browse_page_could_not_be_found_mesage.png Download (57.1 KB) - added by garycmartin 8 months ago.
0001-Error-page-SL-3500.patch Download (11.7 KB) - added by humitos 8 months ago.
Browse_unable_to_load_page.png Download (62.1 KB) - added by garycmartin 8 months ago.
0001-Error-page-SL-3500.2.patch Download (12.2 KB) - added by humitos 8 months ago.
v2

Change History

  Changed 13 months ago by manuq

  • cc manuq added

  Changed 12 months ago by manuq

We need to handle the load-error signal to display our custom page.

 http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#WebKitWebView-load-error

"By default, if the signal is not handled, the web_view will display a stock error page. You need to handle the signal if you want to provide your own error page."

Epiphany does this in load_error_cb of embed/ephy-web-view.c .

  Changed 8 months ago by humitos

  • cc humitos added
  • priority changed from Unspecified by Maintainer to Normal

  Changed 8 months ago by humitos

  • owner changed from erikos to humitos
  • status changed from new to accepted

There is a ticket related with this one

 http://dev.laptop.org/ticket/2520

  Changed 8 months ago by garycmartin

Thanks for digging out that old ticket humitos. I do like the design and intent behind the two mockup images from Eben, though the wording for no-network-error would need a little adjustment regarding the reference to mesh, and the black background with white content should be swapped to closer match current designs:

 http://dev.laptop.org/attachment/ticket/2520/activity_browse_no-network-error.png
 http://dev.laptop.org/attachment/ticket/2520/activity_browse_page-not-found-error.png

I'll attach a mockup of the two above cases to this ticket.

Changed 8 months ago by garycmartin

Changed 8 months ago by garycmartin

  Changed 8 months ago by garycmartin

Just added mockups of the two example Sugar friendly messages. Any more cases of Brows error messages that need work?

Changed 8 months ago by humitos

follow-up: ↓ 8   Changed 8 months ago by humitos

Gary: I've just see your last comment. WebKit doesn't make different between being connected to internet or not. It just says: "Cannot resolve hostname (google.com)" and the error code is always "2".

So, we need another way to check if we are connected to the internet or not and make that difference. Any idea?

in reply to: ↑ 7 ; follow-up: ↓ 9   Changed 8 months ago by garycmartin

Replying to humitos:

Gary: I've just see your last comment. WebKit doesn't make different between being connected to internet or not. It just says: "Cannot resolve hostname (google.com)" and the error code is always "2".

So, we need another way to check if we are connected to the internet or not and make that difference. Any idea?

Blast, I hoped webkit had some hooks. I had a quick look at using javascript testing navigator.onLine, but that always seems to be reporting that our browser is online (even when it isn't), and most other scripts 'phone home' to their servers to test for internet access (which is not a general enough solution for us). Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.

in reply to: ↑ 8 ; follow-up: ↓ 10   Changed 8 months ago by humitos

Replying to garycmartin:

Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.

Thanks. I think it's very useful to show the url typed to know if we made some mistake or not.

Changed 8 months ago by garycmartin

in reply to: ↑ 9   Changed 8 months ago by garycmartin

Replying to humitos:

Replying to garycmartin:

Let me reword the dialogue message and we just go with the one type of message webkit currently provides. Will attach another mockup with the rewording.


Thanks. I think it's very useful to show the url typed to know if we made some mistake or not.

I've just added a mockup with updated wording to cover for the error case that webkit provides for. Please keep an eye on how the text layout flows when the URL is long (lots of web sites these days have quite deep URL structures so will be fairly common).

Changed 8 months ago by humitos

v2

  Changed 8 months ago by humitos

  • keywords patch added

  Changed 8 months ago by manuq

  • status changed from accepted to closed
  • resolution set to fixed

Great, I will push it with the small changes described below, and I have noticed the following things to be solved later:

- the error page doesn't show the faulty url, the url entry is empty (it is displayed if you switch to another tab and go back to the tab with the error page)

- pdf tabs don't display error page when there is no internet connection

- button color is in a slightly different grey tone than sugar buttons

What I've changed:

- converted tabs to spaces in from the error page template

- removed the bottom margin because otherwise the page can scroll unnecessarily:

--- a/data/error_page.tmpl
+++ b/data/error_page.tmpl
@@ -39,7 +39,7 @@
       #container {
           /* we need double percent sign here because
              of Python sustitution */
-         margin: 15%%;
+         margin: 15%% 15%% 0 15%%;
       }
     </style>
   </head>

Pushed as e9915e3d .

  Changed 8 months ago by humitos

These improvements are tracked in #3969. Thanks!

Note: See TracTickets for help on using tickets.