Error in mod_muscol_featured_artists 2.2

Nguyen
Nguyen
Offline
0
I just update MC from 2.1 to 2.2 (Joomla 1.5.23).
I have artists who has few songs but no album.
Mod_muscol_featured_artists used to show them correctly in MC 2.1.
But now with MC 2.2, if no of albums is 0
then number of songs is set to zero too!

(this is the website, in Vietnamese but you can guess
http://amnhac.fm/index.php/nhac )

I wonder if anybody has the same problem.
Responses (1)
  • Accepted Answer

    Nguyen
    Nguyen
    Offline
    Saturday, June 11 2011, 03:12 PM - #Permalink
    0
    Well, I look at modules/mod_muscol_featured_artists/helper.php and fixed this by replacing

    $query = ' SELECT COUNT(*) '.
    ' FROM #__muscol_songs as s '.
    ' LEFT JOIN #__muscol_albums as al ON al.id = s.album_id ' .
    ' WHERE al.artist_id = '.$featured_artists_data[$i]->id

    by

    $query = ' SELECT COUNT(*) '.
    ' FROM #__muscol_songs '.
    ' WHERE artist_id = '.$featured_artists_data[$i]->id

    We have quite a few artists with songs in compilations, not in their own albums. The query that count number of songs would not get the right result if joining with the ablbum table!
    The reply is currently minimized Show
Your Reply