Advertisement
wizonesolutions

Field Collection chat

Dec 27th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. <wizonesolutions> anybody seen something like this fella? PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1: INSERT INTO {field_data_field_nav_item} (entity_type, entity_id, revision_id, bundle, delta, language, field_nav_item_url, field_nav_item_title, field_nav_item_attributes) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, ); Array ( [:db_insert_placeholder_0] => field_collection_item [:db_insert_placeholder_1] => 2808 [:db_insert_placeholder_2] => 38960 [:db_insert_placeholder_3] => field_template3_mini_nav [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => personal-books [:db_insert_placeholder_7] => Personal ) in field_sql_storage_field_storage_write() (line 448 of /vagrant/web/local.blurb.com/src/drupal/drupal/modules/field/modules/field_sql_storage/field_sql_storage.module).
  2.  
  3. <wizonesolutions> looks like somewhere along the line of Field Collection, Entity, or Field SQL Storage...something is producing a bad query
  4.  
  5. <wizonesolutions> this is better than what I was getting before I passed TRUE to $skip_host_entity in $field_collection->save(TRUE)...but maybe related anyway...before file usage was messing up. basically $entity->original is empty sometimes.
  6.  
  7. <wizonesolutions> which is why it updates the file usage wrong
  8.  
  9. <wizonesolutions> I guess the $entity->original thing is the root cause then...hmm...
  10.  
  11. <wizonesolutions> I think it happens when the core entity system calls field_attach_update(), rather than the Entity module calling it with invoke()
  12.  
  13. <wizonesolutions> hmm
  14.  
  15. <ShawnRisk> wizonesolutions: you should have made this simple no one is going to read this all
  16.  
  17. <wizonesolutions> ShawnRisk: I'm sort of supporting myself. I rarely get answers to dev questions on IRC :)
  18. <wizonesolutions> ShawnRisk: I'll probably tweet it next once I clean it up
  19.  
  20. <forsvunnet> wizonesolutions: steps to reproduce?
  21.  
  22. <ShawnRisk> :P
  23.  
  24. <wizonesolutions> forsvunnet: Norwegian nick? :) as for steps to reproduce...I haven't tried to reproduce it from a clean install. Running into it on a client site. Basically we're loading field collections with field_collection_item_revision_load, and then saving any changes with $field_collection->save(). There are some image fields on the field collection.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement