Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#13 | og-fix-1636026-13.patch | 637 bytes | joelstein |
#7 | avatar_selection-og-error-1636026-7.patch | 4.99 KB | David Lesieur |
Comments
Comment #1
deanflory CreditAttribution: deanflory commentedI 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
Comment #2
deanflory CreditAttribution: deanflory commentedEven disabling, uninstalling and reinstalling the dev module didn't work to fix the issue.
Comment #3
stella CreditAttribution: stella commentedOk think I've fixed that now. Latest fix just committed, so the dev version may take up to 12hrs to update.
Comment #5
PlayfulWolf CreditAttribution: PlayfulWolf commentedCan confirm the same error on edit and upload pages with the latest dev. Using og 7.2
Comment #6
InTheLyonsDen CreditAttribution: InTheLyonsDen commentedI 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
Comment #7
David Lesieur CreditAttribution: David Lesieur commentedIt 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:
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.
Comment #8
loze CreditAttribution: loze commentedDavid'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!
Comment #9
deanflory CreditAttribution: deanflory commentedAfter 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.
Comment #10
rickbcwt CreditAttribution: rickbcwt commentedI 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:
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.
Comment #11
blacklabel_tom CreditAttribution: blacklabel_tom commented+1 for the patch in #7. Are there any plans to get this into the dev release sooon?
Cheers
Tom
Comment #12
zmove CreditAttribution: zmove commented+1. more than 6 month old issue, is the module still actively maintained as said in the module page ?
Comment #13
joelstein CreditAttribution: joelstein commentedThe 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.
Comment #14
joelstein CreditAttribution: joelstein commentedDone: http://drupalcode.org/project/avatar_selection.git/commit/f66f16b