I set a user as blocked and got this error message:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CASE WHEN b.fixedweight = 1 THEN b.weight ELSE COALESCE(u.userweight,b.weight) E' at line 3: SELECT DISTINCT b.bid, u.uid, b.weight, b.name, b.image, b.href, b.unhideable, b.fixedweight, b.doesnotcounttolimit, u.userweight, b.tid, r.rid CASE WHEN b.fixedweight = 1 THEN b.weight ELSE COALESCE(u.userweight,b.weight) END coalescedweight FROM {user_badges_badges} b INNER JOIN {user_badges_user} u ON b.bid = u.bid LEFT JOIN {user_badges_roles} r ON b.bid = r.bid WHERE u.uid = :uid AND r.rid = :rid ORDER BY coalescedweight, b.name; Array ( [:uid] => 2273 [:rid] => 0 ) in user_badges_get_badges() (Zeile 962 von /is/htdocs/wp1183236_ZRSG84RKG4/www/beta/sites/all/modules/user_badges/user_badges.module).
Comment | File | Size | Author |
---|---|---|---|
#7 | CapturFiles.jpg | 51.76 KB | Wolfgang62 |
Comments
Comment #1
shabana.navas CreditAttribution: shabana.navas commentedI cannot recreate this error on my end, not sure why you are getting this. Could you provide more information.
Comment #2
Wolfgang62 CreditAttribution: Wolfgang62 commentedWhat kind of information do you need?
Comment #3
shabana.navas CreditAttribution: shabana.navas commentedIs this on a fresh install? If not, was this working before? Have you made any changes to your db? Have you tried reinstalling the user badges module?
Comment #4
Wolfgang62 CreditAttribution: Wolfgang62 commentedIt is not a fresh install.
It was working before.
No changes to the db.
A complete deinstallation and reinstallation? No. I will try that.
Comment #5
Wolfgang62 CreditAttribution: Wolfgang62 commentedI did a clean install and the error message is still there.
I get this message when I click on the blocked user.
Comment #6
Wolfgang62 CreditAttribution: Wolfgang62 commentedOK, anyway which user I want to block I get this error message.
What info do you need else?
Edit: I even can not erase the user.
As soon as I deactivate the module everything works fine.
Comment #7
Wolfgang62 CreditAttribution: Wolfgang62 commentedFurther research: I only get this error message if "Only show blocked user badge" is set.
And I never can see the badge image on the roles site (see attachement).
Comment #8
shabana.navas CreditAttribution: shabana.navas commentedThanks for trouble shooting this. Finally, found the error. There was a syntax error in the db_query. I have fixed it and committed it to the 7.x-3.x-dev version. Please download the latest version.