Installed profile2.module, created a profile. When I go to edit the user's (or my account) and click on the profile tab, the avatars selection show up, though there is no picture field on that page.

Comments

iva2k’s picture

Status: Active » Needs review

After code inspection in avatar_selection.module, function avatar_selection_form_user_profile_form_alter() it appears that $form['picture'] is an empty array. It could be created by some other contrib module, but I did not find which, still could be core 7.18.

I did a quick fix, replaced line 266

  if (is_array($form['picture'])) {

with

  if (!empty($form['picture']['#type']) && ($form['picture']['#type'] == 'fieldset' && is_array($form['picture']['picture']))) {

And the avatar selector is gone.

I don't like doing patches for one-liners like this. Please review code replacement above.

iva2k’s picture

joelstein’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

I cannot reproduce this issue with the latest DEV of Avatar Selection and Profile2 7.x-1.3. If there is another module which is causing this, let's isolate it so we can put together a fix in consideration of actual causes.