The Gravatar integration module integrates Drupal user pictures with the service provided by Gravatar in such a way that allows the user not to upload a picture, but use the default that's associated with her email, and lets Drupal use that picture as her user picture.
Steps to reproduce: Install gravatar.module & ds.module, set up a user with a Gravatar-provided picture (it does get displayed on the user's profile page), set up a DS layout to use the user's picture: it doesn't get displayed.
Error: When Display Suite renders a user's picture, and that user does not have an "own", uploaded picture, but only a Gravatar-provided one, it does not get displayed. (If the user has her "own", uploaded picture, it does get displayed, though.)
Expected behavior: DS should display the Gravatar-provided user picture( replacement)s as well.
Comment | File | Size | Author |
---|---|---|---|
#15 | 1166928-unconditionally-load-accouts-for-gravatar-15.patch | 434 bytes | thedavidmeister |
#13 | 1166928-13.patch | 409 bytes | swentel |
Comments
Comment #1
BoobaaI could work around this issue by using the following patch:
As I'm quite new to DS, I don't know if it's a proper way to handle the issue; most likely it isn't. Anyway, this does Work For Me (TM).
Comment #2
swentel CreditAttribution: swentel commentedAs you said, it's probably not the nicest solution, but I'll do a test myself. I'd rather want to move the check to the ds_return_picture() function and probably use _gravatar_get_account_user_picture() function from the gravatar module itself.
Comment #3
swentel CreditAttribution: swentel commentedCommitted to dev
Comment #5
jonardern CreditAttribution: jonardern commentedComment #6
xtfer CreditAttribution: xtfer commentedCorrecting version.
Comment #7
swentel CreditAttribution: swentel commentedHmm, I think this actually still applies to the 6 version - it's fixed in the 7 branch already.
Comment #8
xtfer CreditAttribution: xtfer commentedAh, so its a backport... reopening then.
Comment #9
MaTaX CreditAttribution: MaTaX commentedso is this fixed or not, I'm using the latest version of this module ad I can't get gravatar images to work
Comment #10
swentel CreditAttribution: swentel commentedThat works yes
Comment #11
MaTaX CreditAttribution: MaTaX commentedhmm that's weird, it's still not working for me
what version of this module is it confirmed working in? I have tried the stable and the first dev 2-x release
Comment #12
swentel CreditAttribution: swentel commentedtagging
Comment #13
swentel CreditAttribution: swentel commentedOk, here's the patch to make it work on everything else like nodes, comments etc, committed to both branches. Back to 6.x
Comment #14
swentel CreditAttribution: swentel commentedRemoving tag
Comment #15
thedavidmeister CreditAttribution: thedavidmeister commentedIt isn't just $entity->mail that you need to make sure you hand off to Gravatar. The entity can be missing a role as well #1440846: Notice: Undefined property: stdClass::$roles in user_access() which leads to php errors and pictures not displaying.
Gravatar unconditionally runs _gravatar_load_account() over "account like" objects that it is about to send to _gravatar_get_account_user_picture(), see gravatar_preprocess_user_picture() for an example.
If DS doesn't mimic what Gravatar is doing with internal functions, there's always a chance that bugs will creep in over time.
Patch attached for 7.x-2.x
Comment #16
swentel CreditAttribution: swentel commentedAlright, thanks. Committd to 7.x-2.x, 7.x-1.x and 8.x-2.x