Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We gave Spark a look-see for a recent project, but we were using Field Collections (and nested Field Collections too) and Spark wasn't doing it's in-place magic.
I imagine this is pretty tricky due to the way Field Collections works, but it'd be a noble cause to get some integration with it. It's an extremely powerful module and in my opinion, one of the major shortcomings of Drupal before FC arrived on the scene.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2013-04-05 at 14.18.39.png | 200.12 KB | Wim Leers |
Comments
Comment #1
webchickPretty sure this is about the inline editing feature specifically.
Comment #2
Wim LeersAccording to http://drupal.org/project/field_collection:
This is some kind of "pseudo" or "virtual" entity, then? It sounds like the data modeling here is off.
In any case, Edit is now built on top of http://createjs.org. Once we get JSON-LD support in Drupal 8 (and Field Collections are also supported), and as long as the content can be annotated (semantically) correctly through RDFa, then it should be possible to make this work. Create has explicit support for collections: http://bergie.iki.fi/blog/create-collections/, http://createjs.org/guide/#collections.
If that turns out to be impossible to map clearly, then it might still be possible to add support for this thanks to the fact that Edit ships with its own "drupalFormWidget"; IOW, if Field Collections is implemented "correctly" from a Field API point of view, meaning that it is "just another field", then it should work: it'd retrieve a form to edit the field collection field, and you'd be able to edit that in-place.
That being said, at least the nomenclature seems to indicate this is something that we should investigate whether this maps cleanly to the semweb "collections" concept, in which case Create.js could be of great help.
I apologize for the vagueness of the answer, but the description on the Field Collections project page is not very encouraging, it sounds like it's implemented kludgily, which is quite possibly the only way to implement it at all in today's Field API. If it's too hacky, then it likely won't be easy to get it to work.
Comment #3
Wim LeersAll of the semwebness in #2 can be forgotten, since this is a D7-only issue, where we won't have JSON-LD anyway (and in D8 we most likely won't either).
Now it really boils down to this:
This is a rather edge-casey thing to support, so marking as a minor feature request.
Comment #4
Wim LeersI started working on implementing this… and … I succeeded! :D
Field collection is a well-implemented module, which made this pretty easy :)
http://drupalcode.org/project/edit.git/commit/751ee1d
Comment #5
Wim LeersI forgot to attach the pretty screenshot, which shows that the above commit makes Edit work both when you edit the full node with a field-collection field and when you edit the field collection entity directly.
Comment #7
molnitza CreditAttribution: molnitza commentedI think the problem is not completely solved. In a custom view it is not possible to use edit for field-collection fields.
Comment #8
Wim LeersCan you please create a follow-up issue, with more detailed info, and especially steps to reproduce? Thanks :)