Summary: | Wikipedia widget returns no results | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | bill p. (aka google01103) <dweeble01103> |
Component: | Context View/Wikipedia | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | lfranchi, rainer.sigle, simon.esneault, stuffcorpse, valorie.zimmerman |
Priority: | NOR | ||
Version: | 2.3.1-GIT | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch to fix network error handling in wiki applet |
Description
bill p. (aka google01103)
2010-07-05 00:48:59 UTC
This is happening for me too, and I've been testing (on random) since reading the forum post. Still getting a few more bands to add to my list of working wikipedia pages, but since I don't know if it is something special about these band pages, I don't know if it's worthwhile to list them. Still, just in case it's useful: Evanescence, L7, Santana, The Beatles, M83, Joy Division, Kenny Loggins, Foo Fighters, The Fray, Bush, Often lyrics aren't fetching either, but again, sometimes they are displayed. It seems to be quite independent of the wikipedia problem, since sometimes they both work, sometimes neither, and sometimes one, sometimes the other. Again, no error in the output from --debug --nofork. Confirmed by Valorie @Valorie I can confirm Beatles, Kenny Loggins and Santana also work for me (only ones you listed that I have). up'ed today to amarok-2.3.1.60svn20100625-37.7.x86_64.rpm and it appears that the wiki widget is working again (at least for me and this version). I got 7 for 7 artists. Unlikely it is really fixed, since Valorie runs a current git version and still has the bug, your's is older. But I can't reproduce this with my version which is the same as Valorie has, on the same Kubuntu 0.04 system. So maybe it is a network setting in the individual systems? I didn't change any network settings, only other thing I did (other than update Amarok) is yesterday I up'ed KDE to 4.4.92 from 4.4.90 Created attachment 48750 [details]
Patch to fix network error handling in wiki applet
Investigated this issue and found out that this is probably a regression caused by commit 1b1ecbb50f51d2a2c19756701710f535d9f208e3 (adding commiter Rick W. Chen to CC). This commit made several context view applets use the network access manager class. The new code cancels a wiki search on every network error reply, also a 404 (page not found) error. However the wiki applets performs several url refinements until it finds a valid wiki-url. This mechanism wasn't working anymore, because a 404-error immediately canceled the complete wiki-algorithm, instead of starting a new and refined wiki-search. The attached patch should fix this problem by not aborting the wiki-fetch in case of a 404 network-reply. This should also fix BR238874. Patch additionally contains some minor whitespace fixes. Thanks Rainer for the patch. I've since fixed that problem in my local branch. It's actually not a simple fix, since I changed a lot on how refinements are handled. This is for a feature I'm introducing, which is to support all languages from wikipedia. It's pretty much done, but I need to test it a bit more so I'm not sure when I'll be merging that into master. Though I don't mind if anyone wants to commit the patch and fix this problem quickly. Rainer: The madness that is if( m_wiki.contains("wgArticleId=0") && (m_wiki.contains("wgNamespaceNumber=0") || m_wiki.contains("wgPageName=\"Special:Badtitle\"") ) ) // The article does not exist is there because we want to find out we are being served the custom 404 page. If we are then the refinements are tried next. By stripping those out the refinements don't get called. This is all pretty hackish since we're parsing the html but there's a better solution to see if a page exists by using mediawiki's listing apis. Isn't this the same bug than bug 238874? Seems to be a duplicate. I agree that https://bugs.kde.org/show_bug.cgi?id=238874 seems to be a duplicate, because in both cases the refinement mechanism isn't working. @Rick: Great news that you're working on further improving the wiki applet. Hope we're seeing your changes soon. Pls. let us know if you need someone to test your local branch. Regarding merge of the patch: no problem from my side to wait until Rick has finished his work. Although the patch seems to work properly for me, I'm able to update it with regards to comment #10, if it's needed quickly. *** This bug has been marked as a duplicate of bug 238874 *** |