Closed (fixed)
Project:
Comment Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Dec 2011 at 20:33 UTC
Updated:
7 Aug 2014 at 10:17 UTC
Jump to comment: Most recent
Comments
Comment #1
bojanz commentedHm, that does sound right... Not sure why it fails.
Comment #2
murzI think this is because in node edit form values are saved via ajax query in function commentfield_submit(), and module don't have hook for entity_save(). So when I modify the array without form and do the save, changed values are not saved.
Comment #3
kevinquillen commentedI can't seem to get this to work either. I need to import comments from a legacy system which are attached to a custom entity. The data gets in the database, but I can't enforce an entity ID on it.
Trying this:
$entity is definitely a valid entity object, so theoretically, when entity is saved the above should work, but its not. The entity_id key is not preserved, resulting in the comment not being attached to the entity.
Comment #4
kevinquillen commentedI even tried this in my Migrate script:
Again, all data reaches the database, but when viewing the entity, comments do not load.
Everything seems to be driven by form states and ajax in commentfield, making it difficult to actually see why my comments in the db are not loaded despite having valid data that mirrors a comment entered manually. Did I miss a helper table or anything? I don't see anything that stands out.
It would be nice to have an API hook for commentfield CRUD outside of forms.
Comment #5
interdruper commented7.x-1.1 now supports Feeds and Feeds API, a suitable choice for migration processes. Please feel free to re-open the issue and possibly provide patches if you still need to handle the Commentfield programmatically.