wikipedia tab shows only languages block

Bug #316140 reported by Evgeny Remizov
46
This bug affects 6 people
Affects Status Importance Assigned to Milestone
amarok (Debian)
Fix Released
Unknown
amarok (Gentoo Linux)
Fix Released
High
amarok (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Intrepid by Mitchell

Bug Description

It seems if the information is only available in English wiki, the error doesn't appear. The problem appeared not so long ago (few days at most) - maybe wikipedia changed page layout so that parser is not able to parse it no more?

I'm using Amarok 1.4.10 from Intrepid with all the updates.

I'm attaching a screenshot (l10n is russian, if it matters somehow).

Revision history for this message
Evgeny Remizov (ram3ai) wrote :
Revision history for this message
variona (variona) wrote :

I confirm that problem. I use gutsy,amarok 1.4.7 kde 3.5.8.
Clicking through the offered languages brings a reproducable result for a certain song/album/artist and language. (i.e Simply Red - Picture book in Italian (Album Page), in Russki (Artist Page). Smashing Pumpkins in Norsk/Nederlands (Artist Page)).
Lyric script is working, and the links as shown in the back and forward arrows bring the expected results if entered in fire fox.

Revision history for this message
Helge Stenström (h-stenstrom) wrote :

Using archive.org, one thing in the html source seems to have changed. Looking at http://en.wikipedia.org/wiki/Kent_(band):
2007: <h1 class="firstHeading">Kent (band)</h1>
2009 (now): <h1 id="firstHeading" class="firstHeading">Kent (band)</h1>

In other words, there is now an id="firstHeading" in the text that Amarok problably parses.

Mihkel Tõnnov (v6lur)
Changed in amarok:
status: New → Confirmed
Revision history for this message
WarwickH (warwickha-deactivatedaccount) wrote :

Thanks to Helge's suggestion, I was able to get the artist tab working again by modifying line 4192 of contextbrowser.cpp in the 1.4.10 source and then recompiling.

from: m_wiki = m_wiki.mid( m_wiki.find( "<h1 class=\"firstHeading\">" ) );
to: m_wiki = m_wiki.mid( m_wiki.find( "<h1 id=\"firstHeading\" class=\"firstHeading\">" ) );

Revision history for this message
Helge Stenström (h-stenstrom) wrote : Re: [Bug 316140] Re: wikipedia tab shows only languages block

2009/1/24 WarwickH <email address hidden>:
> Thanks to Helge's suggestion, I was able to get the artist tab working
> again

Wonderful!

Helge

Revision history for this message
NickA (sdnick484-gmail) wrote :

Helge/WarwickH,

A big thanks to you both! I submitted this bug to Gentoo's Bugzilla (http://bugs.gentoo.org/show_bug.cgi?id=256389), and the change you suggested works there as well. I noticed the bug this morning and was concerned about the lack of support by the KDE Amarok team for the (in my opinion vastly superior) Amarok 1.4.X line, glad to see the community came up with a quick fix.

Revision history for this message
AFP_SCH (aferiap) wrote :

download from here

Amarok 1.4.10 here http://janitux.boaboa.org/etc/amarok_1.4.10-0ubuntu3_i386.deb

Bye

Revision history for this message
Helge Stenström (h-stenstrom) wrote :

AFP_SCH: it works for me now. Thank you!

But the package version is the same as I had before from the official repository, and Synaptic is slightly confused. When I list packages by origin, Amarok isn't in Local/main, as expected, but in se.archive.ubuntu.com/main. Furthermore its is markes as if an upgrade is available, and that upgrade is the version from the official repository. So an upgrade would remove your bugfix.

I hope to see the bugfix in the official repository soon.

Revision history for this message
WarwickH (warwickha-deactivatedaccount) wrote :

I have modified the file again to simplify the change and reduce the chance of compatibility problems with other pages.

My contextbrowser.cpp now contains at line 4192

from: m_wiki = m_wiki.mid( m_wiki.find( "<h1 class=\"firstHeading\">" ) );
to: m_wiki = m_wiki.mid( m_wiki.find( "<h1 id=\"firstHeading\"" ) );

Revision history for this message
Lydia Pintscher (lydia-pintscher) wrote :

Hi, (upstream Amarok here)

we have applied your patch upstream and I informed our packagers about the fix. If they apply it is up to them now. Another release of the 1.4 series is not planned.

Thanks for the fix :)

Changed in amarok:
status: Unknown → Confirmed
Changed in amarok:
status: Confirmed → Fix Released
Revision history for this message
Mihkel Tõnnov (v6lur) wrote :

Actually, I found it's even better to change the offending line to just
m_wiki = m_wiki.mid( m_wiki.find( "<h1 " ) );
This way it matches also these remaining Wikipedia pages, that still have only class="firstHeading" (don't remember the titles, but I came accross a few) - and "<h1 " only occurs once in Wikipedia pages' source anyway.
Secondly, after
m_wiki.replace( QRegExp("<h3 id=\"siteSub\">[^<]*</h3>"), QString::null );
I inserted the following line:
m_wiki.replace( QRegExp("<div id=\"jump-to-nav\">Jump to: <a href=\"#column-one\">navigation</a>, <a href=\"#searchInput\">search</a></div>"), QString::null );
This way, Amarok won't show the pointless (non-functioning) "Jump to: navigation, search" text just below page titles.

Revision history for this message
max (maxozilla) wrote :

fix works great! This fix needs to appear in update manager. Unfortunately amarok 2 is not yet better than 1.4

Revision history for this message
Helge Stenström (h-stenstrom) wrote :

I found a discussion on the Amarok forum. Apparently, they have a fix in SVN.
http://amarok.kde.org/forum/index.php/topic,16359.0.html

Revision history for this message
Hyogapag (hyogapag) wrote :

Anyone to do an amd64 compilation?

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

This bug was fixed in the package amarok 2:2.0.1.1mysql5.1.30-0ubuntu3

---------------
amarok (2:2.0.1.1mysql5.1.30-0ubuntu3) jaunty; urgency=low

  * Add kubuntu_05_wikipaedia.diff from upstream, fixes Wikipaedia applet

 -- Jonathan Riddell < <email address hidden>> Tue, 17 Feb 2009 10:21:38 +000

Changed in amarok:
status: Confirmed → Fix Released
Revision history for this message
max (maxozilla) wrote :

When will this update appear in ubuntu updates? Installing the fixed .deb linked to above causes a conflict with the current amarok package.

In the meantime, for a quick fix, copy and overwrite the attached libamarok.so.0.0.0 to /usr/lib/

Revision history for this message
skunkarific (o-sales-skunkarific-com) wrote :

I tried the deb, it was for kde 4, I tried the libamrarok.so.0.0.0. All kinds of failure. The two lines of code just need to be written into the package and released...

Revision history for this message
koshari (holto2go) wrote :

ubuntu 8.04, just updated to 1.4.9.1 and artist lookup tab is broken, wont load artist and defaults to choice of 3 languages.
apparent known bug
it is fixed in that svn branch, and patches have supposively been sent to the packagers at many distros. i thought todays update would have contained it :-(

Changed in amarok (Gentoo Linux):
status: Fix Released → Confirmed
Changed in amarok (Gentoo Linux):
status: Confirmed → Fix Released
Revision history for this message
alexdd (alexdd) wrote :

Please help!

kubuntu 8.04.3, amarok 1.4.9.1.
the fix in post #16 by max does NOT work,
the .deb in post #7 gives "ERROR: Dependency is not satisfiable: amarok-common" ... couldnt find "amarok-common" for hardy..

what shall i do?

Revision history for this message
skunkarific (o-sales-skunkarific-com) wrote :

Hi! I fixed it by upgrading. I'm not an ubuntu user, my PCLinuxOS
kicked ubuntu's butt, root access, rpms...love it. I had hardy,
upgraded to pclos, no problems now!

alexdd wrote:
> Please help!
>
> kubuntu 8.04.3, amarok 1.4.9.1.
> the fix in post #16 by max does NOT work,
> the .deb in post #7 gives "ERROR: Dependency is not satisfiable: amarok-common" ... couldnt find "amarok-common" for hardy..
>
> what shall i do?
>
>

Revision history for this message
Rogério Theodoro de Brito (rbrito) wrote :

Well, not knowing that there existed some patches, I made my own.

The "fix released" seems to be for amarok 2, AFAIUI. The patch attached to this is meant to be used with Amarok 1.4.

It is based on my discoveries and incorporates some suggestions from people here. Oh, and providing a binary-only package doesn't really help us who run other architectures.

Regards, Rogério Brito.

Revision history for this message
Rogério Theodoro de Brito (rbrito) wrote :
Changed in amarok (Debian):
status: Unknown → Fix Released
Changed in amarok (Debian):
status: Fix Released → Confirmed
Changed in amarok (Debian):
status: Confirmed → Fix Released
Changed in amarok (Gentoo Linux):
importance: Unknown → High
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.