Closed (fixed)
Project:
User Points Contributed modules
Version:
6.x-1.x-dev
Component:
Code: userpoints_badges
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2009 at 20:02 UTC
Updated:
15 Mar 2009 at 13:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
jredding commentedas with the last bug reported this is classified incorrectly. The bug is with userpoints_badges.
If you do not classify the issues correctly you will not notify the knowledgeable parties.
Comment #2
venusrising commentedDo I need to re-write this report in a different area or has it been moved?
Comment #3
kbahey commentedNo, you don't need to report it elsewhere.
As explained on the project page, this project is composed of many modules, each with a different maintainer.
Hopefully the correct maintainer will have time to review this report, or other users of that module can offer their help.
Comment #4
jredding commentedits in the right place now.
Comment #5
Militopedia commentedHello,
I am having the same problem. I hope that there will be a solution to this soon and would be very grateful for that as I think this is a great way to integrate two excellent modules.
Thanks,
Roger
Comment #6
venusrising commentedDoes anyone have any idea what is causing this, we really need to module and have tried checking through the code but still cannot find a clue. Any help would be appreciated.
Comment #7
venusrising commentedDoes anyone have any idea what is causing this, we really need to module and have tried checking through the code but still cannot find a clue. Any help would be appreciated.
Comment #8
kbahey commentedSetting it to critical will not help.
This module was written by BTMash. Try to contact him here http://drupal.org/user/60422 and point him to this issue.
Be patient.
Comment #9
venusrising commentedThanks for the idea, per your suggestion I did send him the link to this post. I will post anything I find out.
Comment #10
venusrising commentedI had lyricnz on Drupal IRC help me and he fixed this issue. I don't know how to do patches etc so I will just upload the correct module file.
The code to correct it is
add
$uid = $params['uid'];
above the line that starts $total_points = userpoints_get_current_points(..)
about line 118 of userpoints_badges.module
Comment #11
kbahey commentedFixed in 6.x-1.x-dev. Will be available when the new tar ball is build tomorrow morning 8 am Eastern.
Comment #12
lyricnz commentedkbahey: missed one more $uid on line 121 - user_badges_user_add_badge($uid, <====
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/userpoints_...
Comment #13
kbahey commentedThanks, got it.
Comment #14
Militopedia commentedHi,
I have changed the two lines as indicated by lyricnz. I cleared the cache but the badges are still not updated.
Have I missed something that I should have done so that the changes take effect?
Thanks,
Roger
Comment #15
lyricnz commentedThis module does NOT reprocess existing users to check for which badge they should have, it simply responds to the "user X userpoints have changed" event, and updates their badges. It does, however, reprocess users if you edit the badge definitions - this may be enough for your application?
Comment #16
sagar ramgade commentedHi..shanon..wat i think that u ve not configured the module properly..may be badges are not configured properly..m willing to help you jus need to clarify few things..is the role changing when userpoints threshold is reached if yes then 4 sure badges modules is not configured properly..i ve tested on ma sandbox server..please give da configuration..wil certainly help you with this issue..
Comment #17
lyricnz commentedWhat do you mean "I have changed the two lines as indicated by lyricnz"? My fix was to add _one_ line:
Add
$uid = $params['uid'];
above the line that starts
$total_points = userpoints_get_current_points(..)
Or you could get the latest -dev release, which has this bug fixed.
Comment #18
kbahey commentedYou do not need to change code. The -dev tarball has the changes that lyricnz fixed.
Try the 6.x-1.x-dev tarball, and report back if it works or not here.
Comment #19
Militopedia commentedHello,
OK, I have uploaded the latest 6.x-1.x-dev module file, emptied cache and edited the badge definitions (is it enough if I just change the badge pictures and save?). However, still the same badges are shown even though a user has enough userpoints to receive the next higher badge.
I then went to the profile page of a user and set the badge manually. However, I noticed the following:
Let's say there are 10 badges No.1 to No.10. The user currently has No.1 but should have No.5. When I set No.5 manually via the profile-tab and save it only goes to No.2 (the check box is marked). I had to repeat this step 5 times until it got to No.5 where I wanted to have it.
Do I have to uninstall the module completely and reinstall it that the changes take effect? Or does it still not work retrospectively but only if now users get new userpoints and cross a threshold to get the next higher badge?
Thanks,
Roger
Comment #20
Militopedia commentedHello,
OK, I figured it out now. I had the "wrong" weights assigned to my 10 badges. After I changed to order from 1-10 to 10-1 the badges are assigned correctly.
Thanks,
Roger