Avatar gallery does not refresh, it keeps the 8 images that had been uploaded when the avatar-module was installed, but it does not updates, more then 128 users have registered since and no new avatar.

Comments

huizache’s picture

This coul have something to do with this: http://drupal.org/node/116469
and thus not be an avatar related bug.

Steven Mansour’s picture

I'm having this same problem, I have new users adding photos all the time, yet they don't show up in the avatar list. I don't have the bug you pointed to anywhere else.

gaijinu’s picture

Same here, I have to manually regenerate the avatar gallery from the admin interface.

ekrispin’s picture

Same here...

Ian G’s picture

I'm having the same issue as well. Is anyone looking into this?

ekrispin’s picture

Anybody home? Anybody looking into this? :-)

For a very active website, this is a major problem. It prevents us from using avatar gallery right now.

ekrispin’s picture

Since this issue is completely ignored for more than 7 months (!!!) (Is there anybody maintaining this module at all?), you can meanwhile make each cron run to regenerate the avatar gallery by adding the following function at the end of the module, just before the closing ?>:

/**
 * Have the avatr gallery regenerated every cron run
 * 
 * Implementation of hook_cron().
 *
 */
function avatar_gallery_cron() {
      avatar_gallery_regenerate();
}

In addition, I see that there are some problems in the underlying function (avatar_gallery_user) that is supposed to do the regenerating when a user picture is updated or a new user is created: the & is missing for the $edit and $user parameters and to the best of my knowledge if there is an insert (a new user registers) then at that round no picture placement or replacement can occur (isset($edit["picture"])). Therefore avatar_gallery_user() should be modified to the following:

function avatar_gallery_user($type, &$edit, &$user) {
  if ($type == "insert" || ($type == "update" && isset($edit["picture"]))) {
      avatar_gallery_regenerate();
  }
}

(The above assumes that you want to include in the gallery also users that do not have uploaded avatar pic yet (rather, a default pic assigned), otherwise omit the insert condition at all)

If the above fixes the problem in your case, please let know here.

Finally, there might be a basic problem with that method, I suspect that when the hook_user is invoked, the new picture in case of update is not yet available, for some reason, for avatar_gallery to include it...

sinewaver’s picture

Many thanks ekrispin for helping out here. It does appear that nobody is looking after this module. since you obviously have a grasp of what is going on and how to solve it - do you have any clue about the foreach() error that gets thrown up at lines 289-291? It is mentioned in the bug reports and support requests...

pfournier’s picture

Please try the 5.x-1.x-dev version of May 6, 2008 and let me know if this is still happening.

pfournier’s picture

Status: Active » Fixed

Latest version of AG (May 10 2008) fixes the refresh problem. It was due to the browser caching the image; now each newly generated AG has a unique name.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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