Whenever I try and create a new node (of type article, page, blog, etc), for some reason I get thrown the following error upon hitting the save button.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'entity_id' cannot be null: INSERT INTO {pathauto_state} (entity_type, entity_id, pathauto) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 1 ) in pathauto_entity_state_save() (line 492 of /sites/all/modules/pathauto/pathauto.module).
I've tried going into the database and setting these columns to allow NULL, but this doesn't seem to fix the issue. I've also tried uninstalling and reinstalling the pathauto module, but no luck.
This error was occurring previously with a couple of other modules, and I seem to have fixed them. I'm just not sure why this error is occurring at all (e.g. I can edit and save existing nodes, but creating new ones all of a sudden is a problem?)
UPDATE: Another issue I seem to get:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'id' cannot be null: INSERT INTO {file_usage} (fid, module, type, id, count) 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] => 126 [:db_insert_placeholder_1] => file [:db_insert_placeholder_2] => node [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 1 ) in file_usage_add() (line 698 of /includes/file.inc).