An additional input for the collection is shown whenever I'm editing a node with a collection in it, which also will get added to the node whenever not removing it myself. However, editing a node doesn't mean I have to add something in the collection, so I wouldn't need the additional field. Also on creating a node I get the input for two collections, while I want to start with just one (users could add more using the link/button).

Has someone already addressed this issue?

Comments

LoyC’s picture

I can confirm this problem. It's very annoying on node edit page.

dinhthinh’s picture

We can organize the node edit page with field group. Grouping some fields into a group, and field collection into a different group. that make me easy to manage the content in edit page.

LoyC’s picture

But that don't solve the problem. Why is there an extra new field collection on every node edit?

dboeije’s picture

Still no response from any of the maintainers.

jmeyerson’s picture

Same issue here. Hoping for some advice. Patch, maybe?

RobW’s picture

Status: Active » Closed (duplicate)

I believe this is a duplicate of #1239946: Embedded field collection items with a default value result in new items on save. There's a ton of discussion on how to fix it there, summed up by "it is very hard to decide when someone means to add a field with default values and when those default values are just added by Drupal."

dboeije’s picture

Status: Closed (duplicate) » Needs review

Sorry, but I still think this should be fixed instead of having patches.

It's the choice of the user editing the note to add entries, in this way it ain't a choice and requires the user delete the additional entry on every edit of the node.

RobW’s picture

Status: Needs review » Closed (duplicate)

Adding a new/empty field by default is behavior from core, not field collection. Pretty sure on that other issue there is a link to a core issue to change this.

All activity to fix this problem specifically for field collection is going on in the other issue. There's no difference between patches and fixing an issue -- they're two steps of the same process. First patches are submitted, then tested (which you can help with!) and when everyone agrees they solve the problem a maintainer commits them.

Because the problem described in both issues is the same, this one is a duplicate.