Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Panels IPE should be locked if another user is making TempStore changes. Using Views UI as an example, we should store a User ID in our SharedTempStore and validate that User ID when making TempStore changes or initially loading Panels IPE.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2699085-tempstore-8.patch | 2.59 KB | tim.plunkett |
| |||
#8 | 2699085-tempstore-8-interdiff.txt | 1.26 KB | tim.plunkett |
#5 | 2699085-tempstore-5-PASS.patch | 2.36 KB | tim.plunkett |
| |||
#5 | 2699085-tempstore-5-FAIL.patch | 1.19 KB | tim.plunkett |
Comments
Comment #2
samuel.mortensonWe should consider moving to PrivateTempStore in this issue as well, with a SharedTempStore lock.
Comment #3
samuel.mortensonSo I started work on this and realized that unlike \Drupal\views_ui\ViewsUI, we do not have an abstracted object that represents temporary state in Panels. Before I write more code - where do other maintainers think that this should live? I was planning on giving PanelsStorageInterface/PanelsStorageBase common methods for dealing with TempStore and locks, so that all UIs can use the same methods to load/clear/lock a PanelsDisplay (using what Panels IPE is already doing as a base).
Thoughts?
Comment #4
dsnopekI'd need to see the code in question to really say if it'd be appropriate to add to PanelsStorageInterface. If it's not something that we'll customize for individual Panels storage plugins, then I think it probably isn't appropriate there.
If it's something that will work the same always, maybe a better place would be on PanelsStorageManager/PanelsStorageManagerInterface?
Comment #5
tim.plunkettThis prevents the tempstore from bleeding over to other users when they *view* the panelized entity.
This does not yet address two users concurrently editing.
Comment #8
tim.plunkettUh, works on my machine...
Comment #11
japerryComment #12
tim.plunkettMade commits against CTools, Panels, and Panelizer to add a locking mechanism similar to Views UI.
If more work is needed, please open new issues and link them from here!