When I'm trying to save the weight settings of a content type I'm getting the error above.
I saw a post mentioning some of this, that it was fixed using the dev version, I've already tried with no luck. This is a multilingual site by the way.
Notice: Undefined index: values in weight_node_type_form_submit() (line 255 of E:\projects\seguridadsocial\sites\all\modules\weight\weight.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null: INSERT INTO {weight_settings} (type, weight_enabled, weight_range, menu_weight, weight_default) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => ) in weight_node_type_form_submit() (line 280 of E:\projects\seguridadsocial\sites\all\modules\weight\weight.module).
Comments
Comment #1
davisbenHi renatodv,
I am unable to reproduce this on a clean install. Do you have any other contrib modules enabled that modify the node type form? The error you are getting shows that no form values are being passed to the submit function, which may be caused by another module modifying them first.
Comment #2
davisbenComment #3
dddbbb commentedI'm getting a very similar error with latest dev when trying to save assigned weights via a view:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null: INSERT INTO {weight_weights} (entity_id, entity_type, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => node [:db_insert_placeholder_2] => 0 ) in _weight_set_weight() (line 605 of /var/www/site/docroot/sites/all/modules/weight/weight.module).Comment #5
davisbenI was unable to reproduce this, but added additional checks to the _weight_set_weight function so the query will only be run if the needed fields are not null.