Hi,
Just got this error with the latest dev version upon installation on Drupal 6.14.
user warning: Key column 'weight' doesn't exist in table query: CREATE TABLE user_badges_user ( `uid` INT unsigned NOT NULL, `bid` INT unsigned NOT NULL, `type` VARCHAR(20) NOT NULL DEFAULT '', `userweight` INT DEFAULT NULL, PRIMARY KEY (bid, uid, type), INDEX uid_bid (uid, bid), INDEX uid_weight (uid, weight), INDEX type (type) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\wamp\www\www.mysite.com.au\includes\database.inc on line 529.
user warning: Table 'meganet_earth.user_badges_user' doesn't exist query: SELECT DISTINCT b.bid, b.weight, b.name, b.image, b.href, b.unhideable, b.fixedweight, b.doesnotcounttolimit, u.userweight, b.tid, 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 WHERE u.uid = 1 ORDER BY coalescedweight, b.name in C:\wamp\www\www.mysite.com.au\sites\all\modules\user_badges\user_badges.module on line 768.
user warning: Table 'meganet_earth.user_badges_user' doesn't exist query: SELECT DISTINCT b.bid, b.weight, b.name, b.image, b.href, b.unhideable, b.fixedweight, b.doesnotcounttolimit, u.userweight, b.tid, 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 WHERE u.uid = 1 ORDER BY coalescedweight, b.name in C:\wamp\www\www.mysite.com.au\sites\all\modules\user_badges\user_badges.module on line 768.
The user badge options appear in the menu, but I haven't tried to mess with any configurations yet. Uninstalling temporarily.
Comments
Comment #1
Nigeria commentedgot the same with 6.14 on clean install
Comment #2
gateway69 commentedanyone got this fixed, im also getting sql error, its like during the install or activation its not putting in the required db fields in the db, do you guys use localhost db or another database server, for me im using my own dedicated db..
Comment #3
pmflav commentedinstall non dev version first.
Then upload dev version. Then run update.php.
Comment #4
magnus commentedI converted to private file system a while ago and haven't been using this module since then. Gave it a new try when URL images where supported. I installed the 6.x-1.5 and then updated to dev and got these errors:
Update #6102
* Failed: ALTER TABLE {user_badges_badges} RENAME image TO image_old
* Failed: ALTER TABLE {user_badges_badges} ADD image varchar(255)
* Failed: UPDATE {user_badges_badges} SET image = image_old
* ALTER TABLE {user_badges_badges} ALTER image SET default ''
* Failed: ALTER TABLE {user_badges_badges} DROP image_old
* ALTER TABLE {user_badges_badges} ADD `unhideable` TINYINT NOT NULL DEFAULT 0
* ALTER TABLE {user_badges_badges} ADD `fixedweight` TINYINT NOT NULL DEFAULT 0
* ALTER TABLE {user_badges_badges} ADD `doesnotcounttolimit` TINYINT NOT NULL DEFAULT 0
* ALTER TABLE {user_badges_user} ADD `userweight` INT DEFAULT NULL
* ALTER TABLE {user_badges_user} ADD INDEX uid_weight (uid, userweight)
Update #6103
* ALTER TABLE {user_badges_badges} ADD `tid` INT unsigned DEFAULT NULL
* ALTER TABLE {user_badges_badges} ADD INDEX tid_name (tid, name)
I manually changed 'image' column to varchar(255) and set it to default ''.
If I visit the tab Badges for a user the page gets WSOD. If I have assigned a badge to the user either manually in the database or by Views Bulk Operation, then I can visit the badge tab for a user.
Comment #5
Akela commentedI am getting a similar sql error on install:
user warning: Table 'dr_latind1.latin_user_badges_user' doesn't exist query: SELECT DISTINCT b.bid, b.weight, b.name, b.image, b.href, b.unhideable, b.fixedweight, b.doesnotcounttolimit, u.userweight, b.tid, CASE WHEN b.fixedweight = 1 THEN b.weight ELSE COALESCE(u.userweight,b.weight) END coalescedweight FROM latin_user_badges_badges b INNER JOIN latin_user_badges_user u ON b.bid = u.bid WHERE u.uid = 1 ORDER BY coalescedweight, b.name in z_drupal\sites\all\modules\_users\user_badges-6.x-1.x-dev\user_badges\user_badges.module on line 768.
Comment #6
1kenthomas commentedWRT #5, see #3. Turn off, uninstall -dev, install 1.5 etc.
//subscribing.
Comment #7
1kenthomas commentedChanging title.
Even with a clean 1.5 to -dev install, I get problems, such as the below. These changes need to be manually made if you have existing tables / data in tables.
Comment #8
1kenthomas commentedThe above transformation better performed via:
ALTER TABLE `example_db`.`user_badges_badges` MODIFY COLUMN `image` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;or thereabouts depending on your collation and charset choices.
Comment #9
Akela commentedOops, how silly of me. Thank you :)
Comment #10
ppcc commented//subscribing
Comment #11
nancydruI have rewritten 6102 to use db_change_field (more D6'ish). That should fix that issue.
I am now working out why user_badges_user isn't getting built.
QUESTION: is anyone having problems with the image or description URL length? URLs are allowed to be much longer than 255.
Comment #12
nancydruThere was a typo in the indexes.
Committed to 6.x-1.x-dev.
Comment #13
nancydruComment #15
fizk commenteduser_badges_update_6102produces this error:Comment #16
fizk commentedComment #17
jk commentedIn version 1.6 under user_badges_update_6102 line
should be
Comment #18
nancydruHere's what I see
Comment #19
nancydruAnd, BTW, this is different from the original issue, so should be in a separate issue.
Comment #20
shabana.navas commentedFixed in Version 7. Please upgrade to Version 7.x-3.x.
Comment #21
fizk commentedThanks Shabana. It'd be great to also fix in 6.x.
Comment #22
shabana.navas commentedWill commit the change shortly.
Comment #23
shabana.navas commentedCommitted to 6.x-1.x-dev version.