Currently, the sort criteria of the view output is:
"Field collection item: Field collection item ID (asc)"
This differs from the order set in the node edit form.
It would be good if the output conforms to the order set in the node edit form.
Great project BTW.
Comments
Comment #1
bennybobw commentedThis is what I did in my hook_views_pre_render to fix this:
Comment #2
rosberg commentedI have been struggling with this issue myself.
Thank you very much bennybobw for a working solution!
Comment #3
daniel-san commentedJust wanted to let you know that this worked for me as well. Thank you for the solution.
Comment #4
neerajskydiver commentedThe solution works well with the ordering. However I tried making a generic solution for the problem by fetching the delta of the items in the field collection but that did not work out as the weight is not saved in the database.
Unless field collection module itself saves some kind of information about the weight this is the best solution to sort out the issue.
Cheers
Comment #5
dieppon commentedHi,
hook_views_pre_render did not work for me but MY_MODULE_views_post_execute did.
Kind regards
Comment #6
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.