favicons not working in konqueror

Bug #369629 reported by Shaun Dennie
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE Base
Unknown
Medium
kdebase (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Using Kubuntu 9.04, many websites do not display favicons in konqueror. The problem appears to be related to konqueror improperly using ~/.kde/share/apps/konqueror/faviconrc. The favicons are being properly written in ~/.kde/cache-$HOST but, if they get written into the faviconrc text file under the konqueror directory, it obscures them.

I have verified this (and a temporary workaround) with another Kubuntu 9.04 user:

In Konqueror, go to slashdot.org. You will not see a favicon. Close konqueror (maybe not needed) and then do a:

chmod -r ~/.kde/share/apps/konqueror/faviconrc

Restart konqueror and again go to slashdot.org. You should now see a favicon.

Revision history for this message
In , Enrique Matías Sánchez (aka Quique) (cronopios) wrote :

Version: (using KDE Devel)
Installed from: Compiled sources
OS: Linux

Konqueror from KDE4 doesn't load some sites' favicons, such as
   http://www.mtv.com

Revision history for this message
In , FiNeX (finex) wrote :
Revision history for this message
In , FiNeX (finex) wrote :

*** Bug 156583 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Enrique Matías Sánchez (aka Quique) (cronopios) wrote :

I confirm this bug is still present on KDE 4.2 beta 2.

Revision history for this message
In , Christian González (droetker) wrote :

*** Bug 185073 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fred-wells (fred-wells) wrote :

I confirm the bug still present in KDE4.2.1.

Revision history for this message
In , Icekiss (icekiss) wrote :

Confirmed in KDE 4.2.2

Additionally, after importing Bookmarks from KDE3 Konqueror, all bookmark icons are replaced with a questionmark on a white sheet. Yet konqueror does not try to refetch them when visiting the page. Icons for new bookmarks appear correctly.

Revision history for this message
In , 3237478-s (3237478-s) wrote :

Confirmed in KDE 4.2.3

This page has more information about the bug:
https://bugs.launchpad.net/ubuntu/+source/kdebase-kde4/+bug/369629

affects: kdebase-kde4 (Ubuntu) → kdebase (Ubuntu)
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at: https://bugs.kde.org/show_bug.cgi?id=153049

Changed in kdebase (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
In , biggerben (biggerben) wrote :

confirmed in kubuntu karmic too.
the favicons of bookmarks don't show either, not even after "update favicon"

Revision history for this message
In , biggerben (biggerben) wrote :

bug still present on my KDE 4.3

Revision history for this message
In , Umar-a (umar-a) wrote :

Any solutions to this annoying bug?

Changed in kdebase:
status: Unknown → Confirmed
Revision history for this message
In , David Faure (faure) wrote :

I cannot reproduce any of this; it all works fine for me, in both 4.3.3 and 4.4-svn. Opening konqueror on slashdot, mtv.com, faz.net... as well as updating the favicon on individual old bookmarks inside keditbookmarks.

Maybe your kded4 crashed? Otherwise I don't really know what could cause this, given that it works for me (on two different computers, with two different versions of KDE)

Revision history for this message
In , Umar-a (umar-a) wrote :

Unfortunately, this is not the case here. Update does nothing. This
has been the case since 4.x. In 3.5 when you edited the bookmarks
and chose to "update all favicons" you could see the process travelling
each bookmark and updating. Now nothing happens.

So, we need to compare details. I am on Fedora 11+updates, and x86_64
versions with qt-4.5.3. What version of qt are you using? I remember
seeing some place that this could be a qt bug.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. But don't worry! This issue is being tracked by the KDE developers at: http://bugs.kde.org/show_bug.cgi?id=153049
Once fixed in KDE, it will be included in Kubuntu once the KDE version the fix is in in reaches Kubuntu.

Thanks!

Changed in kdebase (Ubuntu):
status: Triaged → Invalid
Revision history for this message
In , Jmwagner-a (jmwagner-a) wrote :

Confirmed for Konqueror 4.3.4 - but to me it seems to be several different (but maybe related) bugs.

My view:

The favicons of the bookmarks are replaced with the question mark when you import bookmarks or delete the cache or change anything else concerning konqueror's bookmark's favicons (~/.kde/share/apps/konqueror/faviconrc) because seem to be unable to update - even in the address bar there will be only a question mark for those favicons saved under your local favicon folder.

The only "clean" workaround seems to be deleting the local favicon folder (~/.kde/cache-$HOST), the bookmarks you want to see the favicons for (e.g. bookmarks bar beneath the address bar), restart konqueror (or your whole system) and then adding the wanted bookmarks again one by one (annoying!).

Favicons unknown to the system (not stored in your local favicon folder) should not be concerned. If that is the case, you should additionally delete your ~/.kde/share/apps/konqueror/faviconrc.

Im checking something else and will update this post, if necessary.

Revision history for this message
In , ragnar33 (r-weber-deactivatedaccount) wrote :

I can confirm this on KDE SC 4.3.4.

The workaround above doesn't do it for me.

Also tried it on a clean /home.

Revision history for this message
In , Secludedsage (secludedsage) wrote :

 rm /var/tmp/kdecache-lukrespangrus/kpc/kde-icon-cache.*

think before you try this and try this carefully. hope it work. it works for me.

Revision history for this message
In , Cppege430dtvg7d94ro-david (cppege430dtvg7d94ro-david) wrote :

Confirmed on FreeBSD 8.0 / KDE 4.3.4. Clearing the icon cache only helps a little bit. A few bookmarks will then update, but most will not, even when the favicon is clearly showing in the URL.

Revision history for this message
In , Leonardo-la-malfa (leonardo-la-malfa) wrote :

Favicons still missing on Kubuntu 10.04 with KDE 4.5, as well.

Changed in kdebase:
importance: Unknown → Medium
Revision history for this message
In , Kde-bugs-f (kde-bugs-f) wrote :

Still having this problem on Kubuntu 11.04 / Konqueror 4.6.2.

Revision history for this message
In , Kdedevel (kdedevel) wrote :

I'm seeing this on my netbook (but I've never seen it anywhere else), and am starting to have a look around.

To make sure it's the same issue, here is what I am seeing in Konqueror:

1) For the failing-to-load favicons, when switched to the tab whose favicon doesn't load, the left-hand side of the url in the location bar is flush with the left hand side of the location bar, whereas with correctly-loaded favicons, the favicon is between the left-hand size of the location bar & the url. Importantly, there isn't a favicon-sized blank image there: there is simply nothing at all.

2) For tabs with the failing-to-load favicons, the tab does not contain the favicon: just a blank, favicon-sized patch. (I'm not seeing the "question-mark on a blank sheet" thing, though).

3) The failing-to-load favicons do no show up in the bookmark editor - instead, a blank, favicon-sized patch is theree.

4) In the "Other Tabs" list, the failing-to-load favicons do no show up - there is a blank, favicon-sized patch instead. *However*, sometimes if I hover over one of the entries, its favicon *does* show up (in the list), and stays until I unhover the entry. I haven't discovered a pattern for when this works, though.

5) When switched to a tab with a failing-to-load favicon, the konqueror app icon (i.e. the one that is shown in the window title & taskbar) is set to a generic "globe on white background" icon, *with a tiny version of the favicon in the bottom-right corner*. The favicon does seem to be getting loaded correctly somewhere along the line!

Are people seeing the same symptoms as I am?

I've been hacking around inside keditbookmarks, and in the "if (role == Qt::DecorationRole && index.column() == NameColumnId) " block of kbookmarkmodel/model.cpp, the KIcon returned, when I ask for a 16x16 pixmap, is blank (appears to be a 16x16 fully transparent image) for the failing-to-load favicons, but correct for the others, so it may be a problem inside KIcon (it has a special code-path dedicated to favicons). The required image is present and correct in my kde-cache/favicons folder with the expected filename; it's simply not being loaded, it seems, or is being trashed elsewhere.

I won't have time to investigate further as I'll have to set up a kde build environment on my netbook, which will take a while.

Revision history for this message
In , Kde-bugs-f (kde-bugs-f) wrote :

Woah! Simon! Your description of the bug is very precise and also very accurate! I was able to verify all the points you make (Kubuntu / KDE 4.6.2). You also get special credits for your powers of observations in 4) and 5)!!! Yes, the missing favicons can amazingly be found in the places you describe.

I hope those finding can help someone to get to the bottom of this bug and fix it. Many thanks to the developers.

Revision history for this message
In , Kdedevel (kdedevel) wrote :

Ok, had a quick look into what's going on here, and (at least from keditbookmark's point of view), it's to do with KIconCache not being invalidated when a favicon is.

Sample run of keditbookmarks, assuming that the favicon for somesite.com is not in /var/tmp/kdecache-<user>/favicons:

- keditbookmarks starts up, displays tree of bookmarks;
- Each bookmark has an icon (usually, for websites, the favicon for the site, in which case the icon starts with the magic string "favicons") that must be rendered;
- To be rendered, the icon must be loaded via KIconLoader;
- KIconLoader has a magic path for favicons, where it deduces the full name of the favicon image in /var/tmp/kdecache-<user>/favicons;
- This image is checked for in the KIconCache - if it is there, that image is returned and this will be displayed in keditbookmarks;
- If not, it tries to load the image from the /var/tmp/kdecache-<user>/favicons folder;
- If the image is not there - which is the case with somesite.com, then the image, instead of being null, will be a blank 16x16 icon (not entirely sure how this happens yet - will need to get gdb to cooperate in stepping through the code!)
- This image is then added to the KIconCache and will be used by iconloader for any subsequent requests for this favicon, until the KIconCache is deleted.

So essentially, as soon as keditbookmarks starts up, the current version of the favicon - or a 16x16 blank if the favicon has not yet been retrieved - is inserted into the KIconCache and this cached version will always be returned when that favicon is requested. If the favicon happened not to have been downloaded at this point, then we're stuck with a favicon, even *after* the correct favicon has been downloaded.

One course of action that I haven't yet tried is to call KIconCache::deleteCache() prior to each "emit iconChanged" in lib/konq/favicons/favicons.cpp, but deleting the entire icon cache on this seems like overkill. There doesn't seem to be a more precise way of just removing specific groups of icons from KIconCache. We *could*, instead of that, overwrite just the updated favicon in the KIconCache, but we'd need to duplicate the KIconLoader::makeCacheKey which I'm not keen on, and this wouldn't help invalidating any favicon overlays using the old, invalid favicon.

Another approach might be to make KIconCache itself "favicon-aware" in much the same way that it is currently "theme-aware".

David - a penny for your thoughts? ;)

Revision history for this message
In , Kdedevel (kdedevel) wrote :

Whoops - turns out that KIconLoader's mIconCache is actually a KSharedDataCache, not a KIconCache - silly me! The above is still (mostly :/) correct, though.

Changed in kde-baseapps:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.