This works fine in D7, but let's find out how to make this work for D8 too.

Comments

swentel’s picture

aspilicious’s picture

Had a long talk with Wim about this...
We are kinda screwed... :)

Some notes before I foget:

1) Edit uses the field_name to generate the fancy popups
2) You can only have one! instance of the same field in the same entity. Let's say you have a tags field "field_tags" and lets say your new fancy ds field also have "field_tags" as named.

When that happens the edit js goes through the dom and picks the first instance. It ignores the second one so you can only edit the tags in the first field.

3) So smartass-me thinks, ok lets hide the "real" field_tags field in the display by setting it to hidden. When saving it gets 'removed' from the entity display. So when we visit the node you get a fatal js error.

Why?
Well, my custom field tries to fetch the "renderer" from the entityDisplay with name field_tags. As it is hidden now it can't be found resulting in a crash.

SO conslusion.
1) We can't add inline edit capabilities for fields that are hidden
2) We can't have multiple instances of the same field being inline edited

3) If you want to inline edit you probably need to write a formatter... (thats what wim suggests). I think we need to convert some of our custom fields to formatters in the end...

A lot of things to think about and discuss about.

aspilicious’s picture

Issue summary: View changes
Status: Active » Closed (fixed)