Drupal.quickedit.metadata doesn't refresh the SessionStrage data on node edits.

24 hrs left: https://d2zvu.ply.st/node/1

1. Create a node.
2. ensure the quickedit is loaded from ajax ( so you may click the quickedit button, and need not to do anything)
2. edit a node with diff title and content
3. reload and use quickedit to hover the title/content.

(Even after editing with quickedit, the SessionStrage didn't refresh)

c20171009_170136.png14.39 KBdroplet
Members fund testing for the Drupal project. Drupal Association Learn more


droplet created an issue. See original summary.

Wim Leers’s picture

Issue tags: +D8 cacheability


Wim Leers’s picture

Title: Drupal.quickedit.metadata doesn't refresh » Drupal.quickedit.metadata stores entity label in window.sessionStorage, does not update after entity label changed

To fix this properly, we need to have client-side cache tag support (cache tag invalidations on the server synced to the client). That's a much bigger general undertaking though. For now, we could fix this by

  1. having a data-quickedit-entity-changed attribute that contains the last changed time of an entity (for entities that implement \Drupal\Core\Entity\EntityChangedInterface). We could choose to only allow client-side caching of entity data for entity types that implement that interface.
  2. never caching the entity label

This seems like such an obvious oversight, I wonder how everyone (and myself especially) overlooked this all this time?!

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.