1

I am utilising the basic page content type. When viewing my basic page the layout consists of:

  • A view that outputs a block in the form of a header. Using the basic page fields "title" and "short description"
  • A block that outputs the body of the page.

When I view my page, the node/articles markup is rendered as follows:

<article data-history-node-id="2058" data-quickedit-entity-id="node/2058" role="article" class="contextual-region clearfix" about="/node/2058" data-quickedit-entity-instance-id="0">...</article>

<article data-history-node-id="2058" data-quickedit-entity-id="node/2058" role="article" class="contextual-region clearfix" about="/node/2058" data-quickedit-entity-instance-id="1">...</article>

Analysing the markup we can gather that:

  1. They both have the same node id
  2. The latter can be differentiated by the data-quickedit-entity-instance-id="1" tag
  3. Only the 'quick-edit' button appears for the first article
  4. On quick-edit click, both of the articles are trying to be manipulated by some form of js - there could be conflict here.

So the question is. How come the quick edit feature does not work for a node that is rendered twice on one page?

Has anyone got any reason why it is not working or can provide a solution for this?

Thanks in advance

1 Answer 1

3

According to #15 of this Drupal issue

having a duplicate node on the screen is enough to disable the contextual menu functionality. It's a bug.

2
  • It's a strange one. Just looking at the markup, you'd assume that quick-edit would see multiple instances of the same node. I suppose handling whatever happens after saving the edit to the instance is too advanced at the moment (e.g. updating an image, then having to update every other instance on the same page with that image) It'd be a lot of work.
    – cwiggo
    Oct 24, 2016 at 10:36
  • I've hit this too, and it was quite confusing until I started rendering just one of multiple rendered instances. Apr 7, 2017 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.