When trying to add a new badge (Badge1) I get 2 errors:
Notice: Undefined property: stdClass::$bid in user_badges_edit_form_submit() (line 367 of /***/sites/all/modules/user_badges/user_badges.admin.inc).
PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {user_badges_badges} (bid, name) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1_0, :db_insert_placeholder_1_image, :db_insert_placeholder_1_weight, :db_insert_placeholder_1_href, :db_insert_placeholder_1_unhideable, :db_insert_placeholder_1_fixedweight, :db_insert_placeholder_1_doesnotcounttolimit, :db_insert_placeholder_1_tid); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1_0] => Badge1 [:db_insert_placeholder_1_image] => public://Badge Icon 16x16.jpg [:db_insert_placeholder_1_weight] => 0 [:db_insert_placeholder_1_href] => [:db_insert_placeholder_1_unhideable] => 0 [:db_insert_placeholder_1_fixedweight] => 0 [:db_insert_placeholder_1_doesnotcounttolimit] => 0 [:db_insert_placeholder_1_tid] => ) in user_badges_edit_form_submit() (line 378 of /***/sites/all/modules/user_badges/user_badges.admin.inc).
Environment: Drupal 7.8
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1279532.patch | 2 KB | nancydru |
Comments
Comment #1
Refineo commentedI also got a list of warnings right after the first issue when I reloaded admin/user/user_badges/add.
the same list of warnings on admin/user/user_badges:
Comment #2
Miria commentedI also get these errors (after uploading badge images with seemingly no problem) when trying to "Add" a badge.
Comment #3
Road Kill commentedHi great module the upload works fine but if you try to use the add function and submit I get The website encountered an unexpected error. Please try again later. If I go into the watchdog I see this error.
PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {user_badges_badges} (bid, name) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1_0, :db_insert_placeholder_1_image, :db_insert_placeholder_1_weight, :db_insert_placeholder_1_href, :db_insert_placeholder_1_unhideable, :db_insert_placeholder_1_fixedweight, :db_insert_placeholder_1_doesnotcounttolimit, :db_insert_placeholder_1_tid); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1_0] => Blogger [:db_insert_placeholder_1_image] => public://blogger-icon.png [:db_insert_placeholder_1_weight] => 0 [:db_insert_placeholder_1_href] => [:db_insert_placeholder_1_unhideable] => 1 [:db_insert_placeholder_1_fixedweight] => 0 [:db_insert_placeholder_1_doesnotcounttolimit] => 0 [:db_insert_placeholder_1_tid] => ) in user_badges_edit_form_submit() (line 378 of /var/www/vhosts/spice4life.co.za/httpdocs/sites/all/modules/user_badges/user_badges.admin.inc).
Comment #4
Road Kill commentedHello anybody work here.
Comment #5
Miria commentedNo one else is using 7.x-1.x-dev and/or having this issue? Hope more people can test to help maintainer(s) resolve this error soon.
Comment #6
Spitfire commentedI'm getting same error when trying to add new badge. What values needs to be in DB for it to work? To see if it can be done manually
Comment #7
nancydruThis patch should fix it.
Caution: use this module in a test environment only, and don't get carried away. I think the images are not being uploaded as permanent files, so they will be deleted overnight.
Also, this patch is based on the code from #1304520: Coder finds.
Comment #8
Refineo commentedI applied #1306032: Cumulative D7 Changes and adding new badge works now. Issue solved. Thank you !
Comment #9
nancydruGreat, thanks.
Comment #10
nancydru