Bug was found using Drupal Commons 2.5. Profiles use multiple tabs i.e. "Account", "Personal Information", "Work Information".

The Profile Picture field only shows up on the "Account" tab, yet the Avatar selection options show up on all 3 tabs.

I fixed this by changing line 275 in avatar_selection.module from :
if (count($selects['avatars'])) {
to:
if (count($selects['avatars']) && isset($form['picture']['#type'])) {

It seems an additional check is needed to see if the profile picture field is present on the current page.

Comments

stella’s picture

Status: Active » Fixed

It appears to only be a problem with Drupal Commons. I created a similar setup with multiple profile tabs on my profile on a regular Drupal 6 site with no problems. However, I was able to reproduce it with Commons alright. Not sure what's the cause - possibly another contrib module or something custom in the installation profile. In any case I've committed your patch, thanks!

Status: Fixed » Closed (fixed)

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