I'm having trouble getting any part of the module to work in D7. I applied the avsr patch, and had to remove 'fid' from the database in order to get it to scan my images. But when you go to either "manage avatars", or go to a user's profile, no images are displayed. If I look at the source code, I can see references to the images, but they aren't displayed. I can manually go to the url so it's not an access issue. And then when I select an image to see if it works anyway, I don't get any errors, but the avatar is not assigned to the person. Am I missing something fundamental here?

Files: 
CommentFileSizeAuthor
#10 avatar2.patch14.19 KBburgs
#6 avatar.patch10.87 KBburgs

Comments

Same for me, there is nothing in the user edit section.

I can actually see the images when I edit the profile, but the image isn't applied when I save.

Basically, the Drupal 7 dev version doesn't work. I'm going to try and sift through the code today and see if I can sort out some issues, but there just seems to be a bunch of bits all over the place that don't work. I'm just wondering if the maintainer has a timeline on getting this done. I know it can be difficult as a single maintainer who has other stuff going on, but some communication would be greatly appreciated.

Thanks :)

Priority:Normal» Critical

marking this critical

Apparently the last post on this issues queue by module maintainer dates back to 3 Dec 2010. I have no software development skills, but I will be happy to test it on D7 if you can brush it up a little bit...

StatusFileSize
new10.87 KB

Ok, I'm really only halfway through this, and there's a bunch of things that don't work, but if you're desperate for the basics, then this patch might help. I can't stress how much I haven't tested, or double checked things just yet. Another patch will be on its way soon.

It works!!! Thank you!! :)

Thank you burgs. Should I apply any other patch beside patch #6 ? after applying patch #6 to 7.x-1.x-dev (2011-Feb-26) I see the following errors on /user/*/edit or /user/register. I am not opening any separate issue for those errors as you may be still working on them.

Notice: Undefined variable: dir in _avatar_selection_image_list() (line 489 of /var/www/drupal/sites/all/modules/avatar_selection/avatar_selection.module).
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT COUNT(*) AS expression FROM (SELECT DISTINCT 1 AS expression FROM {avatar_selection} avs INNER JOIN {users} u ON u.picture = concat(:dir, "/", avs.avatar) INNER JOIN {avatar_selection_roles} avs_2 ON avs.aid = avsr.aid WHERE (u.picture IS NULL ) AND( (avs_2.rid IS NULL ) OR (avs_2.rid IN (:db_condition_placeholder_0)) )) subquery; Array ( [:db_condition_placeholder_0] => 2 [0] => :dir [1] => ) in _avatar_selection_image_list() (line 506 of /var/www/drupal/sites/all/modules/avatar_selection/avatar_selection.module).

Yeah, I'm applying this directly to the dev version, and it does change a bunch of functions, and it doesn't do the bulk import yet either. I'm going to try and tidy it up and get the bulk imports working and check for possible errors today and tomorrow. Then there should be a patch that will could be committed. That last one was just a teaser.

StatusFileSize
new14.19 KB

Ok, here is a better patch, that should fix the issue in #8, as well as sorts out the bulk upload / directory scan. I haven't done much work with the D7 file api, so please don't judge, but please do test, and check that this works, and adheres to the standards.

Status:Active» Needs review

status change.

I am in no position to judge, only test... :-) I applied patch #10 to 7.x-1.x-dev, then had to manually apply few changes as per issue 1278802. As user 1 I tried to upload a single image and it seems ok. However when I try to do a bulk scan I get "Scan complete: 0 new avatars found. 0 avatars removed.", although I have few hundred images in the avatar directory. Also, when registering as a new user I don't see the avatar selection widget (although I have set "Force users to select an avatar image on user registration" in AS configuration). Thanks.

Status:Needs review» Fixed

Committed, thanks! If you find other problems, please open a separate ticket.

Status:Fixed» Closed (fixed)

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