I am trying to get quick edit to work in combination with my twig templates where i only print out specific fields like this:


The rendered markup of the field looks like this

<div data-quickedit-field-id="node/21/field_teaser_overline/de/full" class="field field--name-field-teaser-overline field--type-string field--label-hidden field__item quickedit-field">Overline</div>

What i figured out for now is that it must look like the following to actually work

<div data-quickedit-field-id="node/21/field_teaser_url/de/full" class="field field--name-field-teaser-url field--type-link field--label-hidden field__item quickedit-field quickedit-candidate quickedit-editable">http://www.google.de</div>

So the classes:

quickedit-candidate quickedit-editable

are missing.

Any idea what I am doing wrong?

  • The classes are not in the drupal rendered markup, but are added in backbone FieldDecorationView.js. Can you check, if your browser loads this library (when js aggregate switched off)? – 4k4 Sep 16 '16 at 13:12
  • Yeah it is loaded, I am able to quick edit my content when I print it out completly with {{ content }}. So it has do be wrong something with my template. – Sebastian Sep 17 '16 at 9:17
  • There is an issue with blocks, when printing single fields, that the cache tags are missing. You could have a similar problem with nodes and quickedit. The two classes are not the cause of the problem, because their are added in js. You would try to make a diff with js disabled, to see what else is missing. – 4k4 Sep 17 '16 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.