Active
Project:
Field collection
Version:
7.x-1.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 May 2012 at 03:03 UTC
Updated:
29 Jul 2016 at 22:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnpitcairn commentedSo, VBO allows you to set values for fields on an entity. It displays the field forms for the entity, meaning if the field collection is embedded (and possibly if not, I haven't checked), you'll see all the fields in the field collection form. But VBO is only concerned with the field collection instance in the parent entity, not the fields in the collection, so it can either:
A: replace the field collection instance(s) in the selected parent entities with the new, single (shared) field collection instance you have now defined in the VBO interface, or
B: add the new (shared) field collection instance you have defined in the VBO interface to all the selected parent entities.
Neither of these are desirable options. I doubt there is likely to be any non-confusing way to handle VBO operations on multiple entities containing existing field collections (??). If not:
1: field_collection should refuse to be available for "modify entity values", if this is possible, or
2: VBO should detect field_collections as a special case, and not add those to "modify entity values" (in which case this gets bumped to the VBO issue queue).
Comment #2
Anonymous (not verified) commentedI have noticed this issue too.
Comment #3
Yuri commentedAny progress here?
Comment #4
Yuri commentedComment #5
paulihuhtiniemi commentedI'm also interested on this! If any of you have ideas on some custom sulotion on how to alter this functionality to get it save new field collection instance for all each entity, I'm all ears :)
Comment #6
paulihuhtiniemi commentedI tested latest DEV version of field_collection and it doesn't seem to work at all with VBO (3.2). It throws exception "The host entity cannot be changed.", introduced in #2013811-10: field_collection_field_update() saves old host entity and overwrites changes
Comment #7
basillic commentedSame issue too...
Comment #8
jiv_e commentedI had the same error as @paulihuhtiniemi. I'm not sure if this issue is the correct place to handle this. I may have to start a new one, maybe on the VBO issue queue.
I looked into this and found an ad hoc solution. The problem lies in the fact that PHP5 assigns objects as reference. Views_bulk_operations code has some references to entity objects when they should be clones. I'm trying to find a clean general solution to fix this. I'll keep you informed.
Comment #9
jmuzz commentedComment #10
adrien.felipe commentedI believe this to be related with: #2658882: "the host entity cannot be changed" error with VBO
I'm now looking for a way to "Add new Field collection, instead of overwriting the existing values.", like with taxonomy.
Comment #11
abelaguado commentedI had the same problem and solved it by changing the 'Number of entities to load at once' --> set to 1, in BULK OPERATION SETTINGS
I'm using 7.x-1.0-beta8 ...
Comment #12
stevesmename commented#11 fixed my problem. The other half of the problem was related to #10, you want the VBO to be on the parent entity of the field collection (not the field collection entity itself). For me I need to bulk modify the node entity to be able to modify/create a field collection entity. And the "(if all else fails) set this to 1" is likely because of issues in coding of not able loop into entity fields and bulk update more than 1 at a time.