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

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

Reproduce:
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)

CommentFileSizeAuthor
c20171009_170136.png14.39 KBdroplet

Comments

droplet created an issue. See original summary.

wim leers’s picture

Issue tags: +D8 cacheability

Reproduced.

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.

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

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

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Project: Drupal core » Quick Edit
Version: 9.4.x-dev » 1.0.x-dev
Component: quickedit.module » Code
Issue tags: -JavaScript +JavaScript

Due to Quickedit being moved out of Drupal Core and into a Contrib Module, moving this issue to the Contrib Module queue.