Hello, i installed module today.
When I click in menu 'Affiliates Home' -> 'Affiliates' and try to add Category this shows:
* user warning: Unknown column 'weight' in 'field list' query: INSERT INTO affiliates_cats (cat_name, active, weight) VALUES ('Kategoria', 'Y', 5) in /ftp/labs/modules/affiliates/affiliates.module on line 595.
* user warning: Unknown column 'weight' in 'field list' query: SELECT cat_id, cat_name, active, weight FROM affiliates_cats ORDER BY weight DESC LIMIT 0, 50 in /ftp/labs/modules/affiliates/affiliates.module on line 693.
When i try view categories:
user warning: Unknown column 'weight' in 'field list' query: SELECT cat_id, cat_name, active, weight FROM affiliates_cats ORDER BY weight DESC LIMIT 0, 50 in /ftp/labs/modules/affiliates/affiliates.module on line 693.
The configuration options are at their default values.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | affiliates_install.patch | 2.09 KB | fred0 |
Comments
Comment #1
MadMakz commentedSame here? Is that project even still active?
Comment #2
kbahey commentedIt is active and had a major rehaul of late, and an additional maintainer.
Please be patient while he responds.
Comment #3
Anonymous (not verified) commentedApologies for the late reply , looking into this now ...
Comment #4
Anonymous (not verified) commentedThanks for the heads up , i need to update the documentation,
What you need to do is go to the "status report" page @ admin/reports/status
and find the section "Database updates" which should request you to update
the database to pick up the new field defined in the affiliates.install file ..
function affiliates_update_1() {
db_add_field($ret, affiliates_cats, 'weight', array('type' => 'int', 'length' => '3','default' => 0));
}
Please reopen if you need further assistance.
-Paul
Comment #5
fred0 commentedHmm... I just installed the dev version and am seeing this error right off the bat. Looking at the install file, I see that function listed at the end, but the field does not exist in my database.
Tried database update, but it didn't recognize that function as a needed update. I had to select it manually in the update list to get it to apply. It succeeded in adding the field, but I got this returned after the update:
Comment #6
fred0 commentedOk, after fixing a few things in the .module file (see here: http://drupal.org/node/100042#comment-1173863), I realized the .install file needed some work too. The attached patch fixes the update function, adds the weight to the initial install routine and inserts the weight value. It also fixes the uninstall routine.
Comment #7
kbahey commentedCommitted.
Thanks fred0.