I am not sure what caused this problem, as it was working nicely before... Yesterday I realized that one could not see the avatar selection widget anymore: I disabled/uninstalled AS, then reinstalled and regenerated all the avatars, but the problem was still there. So I started playing around with configuration: and found out that unchecking the "Enable unique avatars" flag would bring back the avatars. It looks like the system "believes" that there are no available avatars left, even if there are hundreds of those. What marks an avatar as "taken"?

avatar_selection_distinctive_avatars i:0;
avatar_selection_force_user_avatar i:0;
avatar_selection_avatar_per_page s:1:"5";
avatar_selection_set_random_default i:0;
avatar_selection_force_user_avatar_reg i:1;
avatar_selection_disable_user_upload i:1;

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stella’s picture

An avatar is "marked" as being taken when another registered user has the avatar set as their avatar picture in their profile. The stored avatar for a user is stored in the "picture" column of the "users" table.

Cheers,
Stella

skizzo’s picture

Thank you. I disabled all optimizations, and via phpMyAdmin I manually set a "picture"
in the user table for my 5 users, and enabled the "unique avatar" feature in AS.
Now the avatar selection widget does show up... but instead of
listing all "available" avatars, it lists the 5 "taken" avatars!
I am puzzled :-)

skizzo’s picture

I think I am almost there but I need some help... Reinstalled from scratch, in Access Control the only checked box is "access avatars" for Anonymous Users and I have uploaded a bunch of avatars (available to all roles). Now: for some reason no one, including Admin, will see any selectable avatar. However, if I now edit 3 avatars assigning them to "anonymous user"... then those 3 avatars will be added to table avatar_selection_roles and become visible in the selection widget. It looks like the "if no roles are checked, access will not be restricted" rule does not apply in my case. I don't know why it was working before: I recently changed File System from Private to Public...

skizzo’s picture

This is not an issue for me anymore, as I will be explicitely
assigning all new avatars to "anonymous". I leave the
issue open, in case somebody else hits the same problem.
Thank you.

stella’s picture

Category: support » bug
Status: Active » Fixed
FileSize
4.42 KB
4.39 KB

Fixed in the latest dev release, available later today. Please try the attached patch.

Cheers,
Stella

skizzo’s picture

I still see the problem with today's build "5.x-2.x-dev" 2008-08-05. Bulk deleted.
No roles assigned on new bulk upload: all the avatars are "available to all roles"
and show up regularly in "manage avatars" [settings/avatar_selection/edit/role/0].
However the avatars do not show up on profile edit or user add (and table
avatars_selection_roles is empty).

stella’s picture

Nope, it's definitely fixed. However, the build you're using was created 30mins before the patch was checked in. A new build should be available within the hour. Try that or the patch attached above to fix the problem.

Cheers,
Stella

stella’s picture

Released in Avatar Selection 6.x-1.5 and 5.x-2.7.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Clearbrook’s picture

Version: 5.x-2.x-dev » 6.x-1.5
Status: Closed (fixed) » Active

If you Force Unique Avatars, those that are not available to all will be available to none. I am new to Drupal, but can read PHP, so I'll take a look when I get the chance. It is *not* fixed, but not extremely important.

;'{P

Clearbrook’s picture

Priority: Normal » Minor

Just changing this to minor. If you do not use this, Avatars designed for one specific group only *are* available only to that group. You just can't force unique avatars *and* have unique avatars available only to specific roles.

I've thought more about this, and even with 900+ avatars, when you don't allow uploads, someone could crash you by creating 1,000 accounts without enough avatars to cover them. So the logic may need additional thought to prevent such a thing from happening...

;'{P

stella’s picture

Version: 6.x-1.5 » 5.x-2.x-dev
Priority: Minor » Normal
Status: Active » Fixed

Resetting to previous issue status. If this is still a problem, please open a new separate issue.

To avoid the situation where you run out of unique avatars, ensure you configure a default user avatar on admin/user/settings.

Cheers,
Stella

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.