After updating drupal core to 6.4 the avatars no longer appear to select for the users. The following message appears as an error. I've run the update.php multiple times and used the latest version 6.x-1.5.
* user warning: Unknown column 'weight' in 'order clause' query: SELECT count(*) FROM kssavatar_selection avs LEFT JOIN kssavatar_selection_roles avsr ON avs.aid = avsr.aid WHERE avsr.rid IS NULL OR avsr.rid IN (2,3) ORDER BY weight, name, avatar in /../../sites/all/modules/avatar_selection/avatar_selection.module on line 453.
* user warning: Unknown column 'name' in 'field list' query: SELECT DISTINCT avatar, name, weight FROM kssavatar_selection avs LEFT JOIN kssavatar_selection_roles avsr ON avs.aid = avsr.aid WHERE avsr.rid IS NULL OR avsr.rid IN (2,3) ORDER BY weight, name, avatar LIMIT 0, 30 in /../../sites/all/modules/avatar_selection/avatar_selection.module on line 455.
Comments
Comment #1
stella commentedDid you upgrade to Drupal 6.4 from another Drupal 6 version or from Drupal 5? If from Drupal 5, did you upgrade to the latest 5.x version of Avatar Selection before upgrading Drupal core?
In your database, you should have a avatar_selection table, with the columns: avatar, weight, name and aid. Do you have such a table?
I can send you on the table create syntax for MySQL if you want me to. However, if there aren't many avatars or custom role configuration, etc, you could backup your files, disable and uninstall the avatar selection module, re-enable the module, re-instate the files in the avatar_selection directory and use the "bulk upload -> scan for avatars" option to add them back into the database.
Cheers,
Stella
Comment #2
tigertiburon commentedThanks, I upgraded from 6.2 to 6.4 and the avatars were showing before. However, when I looked in the tables in the avatar_selection table the weight and name columns were missing. Added those two columns and the error was gone and I could see the avatars again.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
blacky5251 commentedHi,
This happened to me as well. I only noticed it now after upgrading to 6.5 from 6.4, but I think it may have occurred when I upgraded from 6.3 to 6.4. My site has only ever been a version 6.x site, starting with 6.3. I went to add a new user today and this exact problem occurred to me. Something is dropping the name and weight columns from the avatar_selection table during the upgrade process. When I checked my last 6.4 mysqldump of the database, the avatar_selection table only had two columns - avatar and aid - so the problem existed (without me noticing it) before I upgraded to 6.5.
Could you please post the MySQL syntax to recreate the table, so I can ensure my columns and indexes are correct.
Thanks,
Ian
Comment #5
stella commentedYou can find the column specification details in the avatar_selection_schema() function in the avatar_selection.install file.
Comment #6
stella commented