User Gravatars do not display in comments when Advanced Forum is being used. Gravatars display correctly in comments when Advanced Forum module is disabled (and regular Forum module is used instead), however when AF is enabled, comments display only the DEFAULT gravatar. Not sure whether this is an issue for the Gravatar module or for the Advance Forum module.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 524592-anonymous-comments-D6-1.patch | 775 bytes | dave reid |
| #9 | Gravatars.jpg | 155.95 KB | fin_777 |
Comments
Comment #1
michelleAdvanced Forum uses
theme('user_picture', $account)to get the user picture, which should be compatable with other modules, including this one. The exception to this is if you use the imagecache preset option. If you have that set, it routes the call through imagecache, which could disrupt modules that rely on theme_user_picture.Check to make sure you don't have a preset selected. If you do, select the blank line at the top, save the settings, and clear your cache. Let us know if that fixes the problem.
Michelle
Comment #2
fin_777 commentedImagecache is not being used in my case.
User Gravatars apear OK on User Profile pages even with AF enabled and appear OK on comments submited by drupal registered users.
The condition I am describing refers to posting comments as an anonymous user (not registered in drupal). Such an anonymous user can provide a name and email address on the comment form, and have his Gravatar displayed next to the comment. This functions well with standard Comment and Forum modules, however doesn't function with AF forum comments (or any comments if I ask to have all comments themed by AF). In these cases it displays the DEFAULT gravatar only and not the actual User Gravatar associated with the email address provided.
Hope that helps.
Comment #3
dave reidOk, then maybe you don't have the 'use Gravatars' permission enabled for anonymous users?
Comment #4
fin_777 commentedImagecache is not being used in my case.
User Gravatars apear OK on User Profile pages even with AF enabled and appear OK on comments submited by drupal registered users.
The condition I am describing refers to posting comments as an anonymous user (not registered in drupal). Such an anonymous user can provide a name and email address on the comment form, and have his Gravatar displayed next to the comment. This functions well with standard Comment and Forum modules, however doesn't function with AF forum comments (or any comments if I ask to have all comments themed by AF). In these cases it displays the DEFAULT gravatar only and not the actual User Gravatar associated with the email address provided.
Hope that helps.
Comment #5
fin_777 commentedPermissions are enabled - functions as expected when AF is disabled.
Comment #6
dave reidThen the only thing I can think of is that the correct mail variables are not being provided to template functions.
Comment #7
fin_777 commentedMichelle, I was wondering if you could test this functionality with Advanced Forum enabled in your environment (on Drupal 6.x) and confirm whether this is a bug or not. (If you have some spare time that is .... just read your blog about taking a break from support ..). If not, hopefully someone else will have the time to test and confirm wheter it works for them or not.
Thanks a lot in advance.
Comment #8
michelleThat blog post was a while ago. :) Still, though, installing and configuring a module I have no interest in and signing up for an account I don't need to test a problem that is unlikely to be in AF is a bit much right now. Maybe someone else who uses AF and Gravitar will step up.
Michelle
Comment #9
fin_777 commentedHi David,
I have read http://drupal.org/node/512978 where Gravatars were not displayed as the email addressed was being not passed.
This doesn't seem to be the case here. When I edit a post as an admin. I can see the email address correctly associated with the entry. Also, as I mentioned, the issue is apparent only on Advanced Forum comments or when all comments are being theming by Advanced Forum. Without Advanced Forum, the Gravatars appear fine. I am attaching a screenshot of what I am experiencing in each case.
At the moment I am using:
- Drupal 6.10.
- Gravatar Intergation 6.x-1.7
- Advanced Forum 6.x-1.0-rc3
I guess I will try to upgrade the core to 6.13 and see what happens.
PS: Actually, just noticed there is a newer version of AF as well, might try that first.
Comment #10
dave reidI checked out Advanced Forum 6.x-1.x from CVS and confirmed that when the 'Treat all site comments like forum posts' option was enabled, Gravatars for anonymous users were no longer displayed. I discovered that in advanced_forum_preprocess_comment() that the $variables['account']->mail was not re-loaded for anonymous comments, so that information was never available for the Gravatar module to work. I'd probably recommend seeing if other important information is lost.
With the attached patch, anonymous comments with Gravatars displayed properly.
Comment #11
fin_777 commentedDave,
Thank you very much for spending time on this. Your patch made it work for me as well. So that's great, Thanks again.
1 missing line ...... when I see the fix it seems easy - but couldn't find it before :)
Comment #12
michelleAh, I see. That isn't something core uses in theme_username, which is why it wasn't there. It's a simple enough change, though, that shouldn't break anything else, so I'll get it into the dev.
Michelle
Comment #13
dave reidYeah, it's not actually used by theme_username, but it is provided to it. In comment.module's template_preprocess_comment, there is an almost-fully complete comment data (from comment_render()) in $variables['comment'] that is passed to theme_username().
Comment #14
michelleI'll have to look if it's possible to pass the whole comment in AF as well. It's been a long time since I wrote that and I dont' remember. I don't have AF 1.x set up on any site right now so it may be a while. In the mean time, folks can use your patch. I'll get it in next time I do any changes so applying the patch will be a one time thing.
Michelle
Comment #15
dave reidVery appreciated Michelle! Yeah if the entire comment was passed, that would probably be ideal since that's what core sends through, so any other contrib modules might depend on any of that information.
Comment #16
michelleAdded to both branches of 6.x. Untested since I don't have any 1.x sites set up and my 2.x site has nodecomment installed. But it's a small enough change it should be fine.
I decided not to send the whole comment in since I'm sending it to Author Pane, not theme_user_picture directly. This is the first time anyone's even needed the email in all this time so it's pretty edge case anyway. If something else comes up in the future, I'll address it then. For now, it has everything core needs plus email which your module needs so it should be fine.
Michelle