Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
edit.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
25 Oct 2013 at 11:27 UTC
Updated:
29 Jul 2014 at 23:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
wim leersUpdated issue summary.
Comment #1
wim leersEt voila.
Comment #2
gábor hojtsyHah, I looked for explanation on that link and it got back to this issue. Where is this behaviour explained? Why is this a surefire way to do the checking?
Comment #4
wim leersBecause that is the view mode
field_view_field()sets when not passing a view mode, but instead generating one "on the fly" using "display options": https://api.drupal.org/api/drupal/core%21modules%21field%21field.module/....You're right that this should be explicitly documented though, so fixed that in this reroll.
Comment #5
gábor hojtsyLooks good to me now :)
Comment #7
wim leers4: edit_view_modes_display_options-2120335-4.patch queued for re-testing.
Comment #9
wim leers4: edit_view_modes_display_options-2120335-4.patch queued for re-testing.
Comment #10
wim leers4: edit_view_modes_display_options-2120335-4.patch queued for re-testing.
Comment #11
wim leersBack to RTBC as per #5, now that testbot is finally cooperating.
Comment #12
webchickThis patch is just updating the code to reality, so seems fine.
Committed and pushed to 8.x. Thanks!
However. I have absolutely no frigging idea what you are talking about :P and since the code in question links back to this issue, could you please update the issue summary with some English? :) I think what you mean is straight-up fields on e.g. a node or block will work, but if the field is rendered in a custom way, like for example Views saying to replace some token text in the field, then it won't.
...but I have no frigging idea, so a concrete example would be super helpful. :)
Comment #13
webchickHm. Helps to read the automated test, I guess.
So basically, if under admin/structure/types/manage/article/display you have changed any of the selections there from their defaults, in-place editing can't work..? Or only if this is changed at display-time vs. configure-time?
Comment #14
wim leersIn fact, the code *does* contain the full English explanation that you need, it's just bizarre/confusing terminology in Field API:
If you look at
field_view_field()'s$display_optionsparameter you'll see it accepts two arguments: 1) the name of a view mode, 2) a dynamically defined array of display options. What the docs say is that only 1) is supported, not 2).In other words: if you create (or modify) a view mode ("Entity Display" in D8 parlance), in-place editing will work. Otherwise, if you dynamically define an array of "display options", it won't. Why? Because Edit doesn't have a view mode to refer to, to know how to rerender the field when in-place editing.
I hope that sufficiently clarifies it for you!