Hey,

I currently struggling to get quickedit to work with single fields printed out inside my twig template.
For testing proposal I am using the node.html.twig template from the classy theme and modified it a bit:

<article {{ attributes.addClass(classes) }}>

  {{ title_prefix }}
  {% if not page %}
    <h2{{ title_attributes }}>
      <a href="{{ url }}" rel="bookmark">{{ label }}</a>
    </h2>
  {% endif %}
  {{ title_suffix }}

  {% if display_submitted %}
    <footer class="node__meta">
      {{ author_picture }}
      <div{{ author_attributes.addClass('node__submitted') }}>
        {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
        {{ metadata }}
      </div>
    </footer>
  {% endif %}

  <div{{ content_attributes.addClass('node__content') }}>
    {{ content }}
    </br>
    {{content.field_teaser_text}}
    </br>
    {{content.field_teaser_button_text}}
  </div>

</article>

Quickedit is working fine for everything that is printed out by {{ content }} but it is not working for the two fields below it.

This is a the markup from a field printed by {{ content }}:

<div data-quickedit-field-id="node/21/field_teaser_text/de/full" class="clearfix text-formatted field field--name-field-teaser-text field--type-text-long field--label-hidden field-wysiwyg field__item quickedit-field"><p>Ich bin dein Teaser text</p>
</div>

And this is the markup created when i print just the field:

<div data-quickedit-field-id="node/21/field_teaser_text/de/full" class="clearfix text-formatted field field--name-field-teaser-text field--type-text-long field--label-hidden field-wysiwyg field__item quickedit-field"><p>Ich bin dein Teaser text</p>
</div>

So pretty much the same, but just not working :-/

Any hint how to get it working for single fields?

Greetings
sgurlt

Comments

sgurlt created an issue. See original summary.

Wim Leers’s picture

Status: Active » Postponed (maintainer needs more info)

Those are not "pretty much the same", they're identical. Did you make a mistake in the copy/pasting perhaps?

What exactly is breaking? Please record a screencast.

Wim Leers’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response. Feel free to reopen :)

Wim Leers’s picture

Title: Quick edit for single fields in template » Quick Edit for single fields in template