Closed (fixed)
Project:
Field Collection Table
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2011 at 20:55 UTC
Updated:
4 Jan 2012 at 00:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
sachbearbeiter commentedsub
Comment #2
tim.plunkettI'm not having this problem at all. When was the last time you downloaded the dev, perhaps it was fixed more recently?
Comment #3
ronino commentedI cannot confirm this, running 7.x-1.0-beta2. Works as expected, field order is correctly changed.
Comment #4
robcarrI'm having this problem regarding field order being observed. I'm running latest 7.x-1.x-dev (24 Nov 11).
However, field order is correct when using the embedded form (from the parent node>edit). I'm only seeing the problem when I 'Add' a field collection item from the Node>View page, ie, the fields [within the collection] are displayed in the original order they were added to the field collection type.
So, using @karlos007's example:
Comment #5
charlie-s commentedSame issue here. The embedded form respects order. The standalone form does not.
Comment #6
nkschaefer commentedThe problem is with using the Field Collection Table module. That module sets the standalone Field Collection edit form to use one of its theme hooks. This theme hook is what makes all the fields appear in a nice table when using the embedded widget and editing the parent content that contains the field.
When using the standalone Field Collection form, though, no check is made to ensure that fields are rendered in the correct order - I've attached a patch that does that. All it does is look at the weight of each field widget after calling field_info_instances() and before adding them to the form.
Thanks,
Nathan
Comment #7
tim.plunkett@nkschaefer, thanks so much for nailing that down!
I cleaned it up a little bit to be more in line with
_field_sort_items_value_helper()http://drupalcode.org/project/field_collection_table.git/commit/c3054c8