Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I tested this with a clean install. Add a new field collection item with the embedded form when editing a node and it will be archived afterwards if you made a new revision for the node. I think it's because of some changes that were made to help support modules that allow you to make new revisions that don't get published immediately, but it happens when you just use Drupal's default revisioning system if you check create new revision under publishing options when doing the edit.
Comment | File | Size | Author |
---|---|---|---|
#1 | field_collection-cc-2125017-1.patch | 1.05 KB | jmuzz |
Comments
Comment #1
jmuzz CreditAttribution: jmuzz commentedSome of the checks called from field_collection_field_update are returning incorrect values because of cached data in the node. I determined this by running the check multiple times during node_save(), the incorrect value was returned until the cache clear happened at the end.
I have a patch for it with an added cache clear on the item before the check is done. It shouldn't be as bad as it sounds because this cache clear is done at the end of node_save() in node.module anyway and the patch just adds one more call to it.
Comment #2
dealancer CreditAttribution: dealancer commentedLooks like there are related issues:
https://drupal.org/node/2274953
https://drupal.org/node/1989610
Comment #3
dealancer CreditAttribution: dealancer commentedWorks perfect! Also changed status to major, us without this patch field collection does not update current revision in some cases.
Comment #4
capmex CreditAttribution: capmex commentedI experienced the same issue when adding a field collection with a different user than user/1. All field collections added did not displayed the edit|delete links and on the field_collection_info table they appeared as archived (value 1).
The patch fixed this issue.
Comment #6
jmuzz CreditAttribution: jmuzz commentedAlso added a test case for it.
Comment #8
jedihe CreditAttribution: jedihe as a volunteer commentedSince the committed patch doesn't fix the already inconsistent data at the database level, I think it may be of help to anyone troubleshooting this to look into a helper drush script I wrote for identifying the nodes/fields with the said inconsistency. You can find it on this comment (#2416237).