I'm using the latest dev versions of user badges and author pane. Iget the problem when displaying an advanced forum, in the forum topic node the badge it's shown correctly but in the comments sometimes it's displayed right but mostly I get a random alphabetical character (the same character for the same user) like this

v

Maybe you can point me in the right direction to debug this

CommentFileSizeAuthor
#8 user_badges.author-pane.patch489 bytesmagnus

Comments

myfarmertan’s picture

I too am having this problem, I'd be happy to provide any info that may help troubleshoot this problem.

To start I've had this same problem using both 6.x-1.5 and 6.x-1.x-dev of user badges. I'd have to assume the problem lays with Author Pane and how it's retrieving the badges.

Democron’s picture

Same problem with 6.x-1.5

magnus’s picture

Title: user badges not showing correctly on author pane » Uer Badges not showing correctly on Author Pane
Project: User Badges » Author Pane
Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: Miscellaneous » User interface
Category: support » bug

After I upgraded to Author Pane 2.x I got the same problem. If I copy the old user_badges.author-pane.inc from 1.x then it works again, so I guess it has something to do with the caching that is introduced in Author Pane 2.x.
The badges shows up for some people, and for others it just shows a random character even though the person only shows up once in a thread.
I tried to turn of caching, without any result.

andrej11235’s picture

I had exactly the same problem with Author Pane 6.x-2.0-rc1, User Badges 6.x-1.5 and Advanced Forum 6.x-2.0-alpha2

Temporary solution: downgrade author pane to Author Pane 6.x-2.0-alpha2

jaypan’s picture

Same problem here.

jaypan’s picture

Found it. In the file:

author_page/modules/user_badges.author-pane.inc on line 30, this:

$cached_user_badges = $variables['user_badges'];

Should be this:

$cached_user_badges[$account_id] = $variables['user_badges'];

Make that change and the badges appear properly.

jaypan’s picture

Version: 6.x-2.x-dev » 6.x-2.0-rc1
magnus’s picture

Title: Uer Badges not showing correctly on Author Pane » User Badges not showing correctly on Author Pane
Version: 6.x-2.0-rc1 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new489 bytes

Thanks Jay, your suggested change works great. I made a patch for this simple change.

michelle’s picture

Title: User Badges not showing correctly on Author Pane » Uer Badges not showing correctly on Author Pane
Version: 6.x-2.x-dev » 6.x-2.0-rc1
Status: Needs review » Fixed

Whoops! Thanks for finding that. That's the trouble with having untested integrations... Easy to miss typos. :(

Committed, thanks!

Michelle

michelle’s picture

Sorry, G-son. I was committing his fix while you were making the patch. :)

Michelle

jaypan’s picture

Glad you both got it sorted out :D

If it had been a longer fix, I would have made a patch, but it was only one line.

michelle’s picture

Yeah, I'm not picky about patches for small stuff like this. It's just as easy to fix as it is to get a patch and apply it. :)

Thanks both of you.

Michelle

Status: Fixed » Closed (fixed)

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