Avatar Selection 7.x-1.0 as well as 7.x-1.0-dev both conjure up this error when loading this page:
/admin/config/people/avatar_selection/upload

Here's the error:
Fatal error: Call to undefined function og_load_multiple() in /home/account/public_html/drupal/sites/all/modules/avatar_selection/avatar_selection.admin.inc on line 884

So I'm unable to upload avatars with either version for D7. Any ideas?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deanflory’s picture

I also just got this error on the "Manage avatars" page:
/admin/config/people/avatar_selection/edit

Fatal error: Call to undefined function og_load_multiple() in /home/account/public_html/drupal/sites/all/modules/avatar_selection/avatar_selection.admin.inc on line 884

deanflory’s picture

Even disabling, uninstalling and reinstalling the dev module didn't work to fix the issue.

stella’s picture

Status: Active » Fixed

Ok think I've fixed that now. Latest fix just committed, so the dev version may take up to 12hrs to update.

Status: Fixed » Closed (fixed)

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

PlayfulWolf’s picture

Status: Closed (fixed) » Active

Can confirm the same error on edit and upload pages with the latest dev. Using og 7.2

InTheLyonsDen’s picture

I am getting the same error with both the dev and stable versions. As a harsh workaround I commented out all Organic Group code in avatar_selection.admin.inc and the module is now working for me.

The code lines are:
271-278
314-320
367-377
539-547
655-657
882-889

My gut feeling is that the og_load_multiple() function called in line 884 is not being used in current versions of Organic Groups.

Great module though!
Kevin

David Lesieur’s picture

Status: Active » Needs review
FileSize
4.99 KB

It really looks like an issue of Avatar Selection not being compatible with API changes in Organic Groups 7.x-2.x.

I have also worked around this problem the harsh way, by disabling OG integration from Avatar Selection. One may disable it by applying the patch, and then adding the following to settings.php:

$conf['avatar_selection_og'] = FALSE;

Would it be a valid feature to allow the disabling of OG integration in Avatar Selection? I'm not sure, but if it was the case this patch could be a start. Obviously, OG integration would still need to be fixed.

loze’s picture

David's solution worked for me until OG support is fixed.
"og_load_multiple()" is no longer in OG 7.x. I'm not sure what it has changed to.

Thanks for the patch!

deanflory’s picture

After performing all the items suggested on this page to this point, I'm now finding that selecting an avatar and saving the account form causes an "An illegal choice has been detected. Please contact the site administrator." error and the thumbnails of the avatars are now in a vertical column instead of a left-float grid and they now show their radio buttons next to the thumbnails and most importantly, it doesn't save the choice in avatar, thus making this module non-functional (after all that time importing and setting those settings on 65 avatars, hmph, grrr).

Disabling as this module is likely dead and has never fully worked.

rickbcwt’s picture

I tried to follow along with the code to remove all of the OG references, but failed. Finally # 7 worked for me. Here's what I did:

  1. I used NetBeans on Win platform to apply the patch (see directions here --> http://drupal.org/node/60179).
  2. I then uploaded /overwrote the Avatar Module files with the patched version
  3. Disabled and uninstalled the module to clear previous data
  4. And then re-enabled the Patched Avatar Module per #7

Thank you so very much David. Your work has salvaged my sanity. And, so far, this patched module is working sweet on Dupal 7. Hope my feedback helps.

blacklabel_tom’s picture

+1 for the patch in #7. Are there any plans to get this into the dev release sooon?

Cheers

Tom

zmove’s picture

+1. more than 6 month old issue, is the module still actively maintained as said in the module page ?

joelstein’s picture

Title: Upload page Fatal error » Call to undefined function og_load_multiple()
Issue summary: View changes
FileSize
637 bytes

The function og_load_multiple() is part of the Organic Groups 7.x-1.x series, which is no longer a recommended release. Only the 7.x-2.x series is recommended, and it doesn't use this function anymore.

I've uploaded a patch which solves this and fixes several issues in the queue. No need to comment anything out (like some of the comments in this issue recommend). Just apply this function and you can use the module again, now with OG support.

joelstein’s picture

Status: Fixed » Closed (fixed)

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