Posted by Stefanos Karagos on January 27, 2009 at 12:56pm
Jump to:
| Project: | Gravatar integration |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
I'm receiving the following notice in logs:
"Default variable for gravatar_toggle not found."
And no Gravatar icons appears in comments
[yes I have double check the settings [themes and user pictures] and the permissions :-)
Any idea/suggestion pls?
Comments
#1
Can you give the 6.x-1.x version of the module a try and let me know if it fixes your problems? I know for sure that it should fix the default variable message.
#2
I just installed 1.x version and the default variable message didnt appear.
but the the problem of the avatars I mentioned in my previous msg, still exists...
#3
A few questions:
- Do the default pictures appear at all?
- Do you have a theme enabled at admin/build/theme
If you are ok posting a link to your site, I can check it out myself to see if I can find what is going wrong.
#4
Hi Dave!
No never default gravatar pictures appear at all!
Yes off course I have enable the pictures in comment to my theme and even to the global theme settings
my site is the http://laptopblog.gr
[the only icon you can see is my icon in a comment here http://laptopblog.gr/node/157 and is the avatar I uploaded via my page]
any help is more than welcome!
#5
Any progress on this issue?
#6
I still have not been able to figure out why it's not working. I'm wondering if it's some kind of template issue that does not show the picture if the user is anonymous.
#7
I'm having this problem too, I might be able to give you some extra information.
When no 'default image' is filled in in admin/user/settings#edit-user-pictures-0-wrapper/ and anything else then 'Global default user image' is enabled in admin/user/gravatar no gravatars appear. The only thing I managed to do is to get a default image, when I choose one in admin/user/settings#edit-user-pictures-0-wrapper/ and change the settings for gravatar to 'Global default user image'.
The theme I use is 'newswire'.
I wonder if this have anything to do with the following function in template.php:
/**
* Theme override for user_picture
*
* @return
* The un-themed variable
*/
function phptemplate_user_picture(&$account) {
if (variable_get('user_pictures', 0)) {
if ($account->picture && file_exists($account->picture)) {
$picture = file_create_url($account->picture);
}
else if (variable_get('user_picture_default', '')) {
$picture = variable_get('user_picture_default', '');
}
if (isset($picture)) {
$alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));
$picture = theme('image', $picture, $alt, $alt, '', FALSE);
if (!empty($account->uid) && user_access('access user profiles')) {
$attributes = array('attributes' => array('title' => t('View user profile.')), 'html' => TRUE);
$picture = l($picture, "user/$account->uid", $attributes);
}
return $picture;
}
}
}
#8
@bdeferme Oh thanks for reporting that. Yes, if a theme overrides user_picture, then the Gravatar module is not going to have any kind of chance of working since it has the final override over the user picture theme code. I'll try and search to see if I can find any other themes that do this.
The following themes are known to not work with the Gravatar module along with links to the bug reports in each theme:
newswire: #373397: phptemplate_user_picture() is unneccessary
Genesis: #373400: phptemplate_user_picture() is unneccessary
#9
After removing function phptemplate_user_picture() from the template.php, Gravatars works smoothly!
Good finding Dave!
#10
Yay...I'm glad we figured out what the problem was, and now I should be able to add a check in gravatar_requirements when this happens.
Please note, if you comment out the phptemplate_user_picture in your theme's template.php to fix this temporarily, make sure to go to the admin/build/themes page and 'Save' or go through the update.php process to clear out the theme function registry.
#11
Oh, nice, I tried to comment out the phptemplate_user_picture but I got an error reporting that the function wasn't found. If only I knew it was as simple as going to dmin/build/themes and clicking save to fix this :-).
Anyway, thx Dave!
#12
I was not able to find any other themes that have this happen, and it actually looks like both genesis and newswire are by the same author, so this should be just an isolated problem.
#13
Since we have isolated the problem and the Gravatar module is not at fault, I am closing this issue as won't fix. Hopefully jmburnz will get both his themes fixed soon.