Problem/Motivation
Panels forms in the frontend and backend currently use temporary storage that is shared between users, which causes unexpected behaviors with multiple editors. This has led distributions like Lightning to patch Panels to work-around issues.
When I wrote Panels IPE originally, I used Shared Tempstore because I had the ambition to support multiple concurrent editors ala Google Docs - but given the complexity of that feature I don't think that it will ever come in.
Proposed resolution
Use PrivateTempStore instead of SharedTempStore.
Remaining tasks
Review the patch and discuss this change.
User interface changes
None.
API changes
All methods that took in SharedTempStore or SharedTempStoreFactory now take in PrivateTempStore and PrivateTempStoreFactory.
Data model changes
None, although users with unsaved changes will lose them after applying this patch (I think this is low impact, it is "temporary" storage after all).
Comment | File | Size | Author |
---|---|---|---|
#11 | 1130x755_27_03_2017_img-02_1490608014.png | 108.79 KB | pifagor |
panels-use-private-tempstore.patch | 29.93 KB | samuel.mortenson | |
Comments
Comment #2
samuel.mortensonUploading a similar patch for Panelizer, based on the open default wizard work being done in #2664682: Implement admin UI for editing Panelizer defaults.
Comment #4
samuel.mortensonIgnore the previous Panelizer patch, I think we'll only need to change this in Panels.
Comment #5
artreaktor CreditAttribution: artreaktor as a volunteer and commented#3 is working for me, thanks!
Comment #6
samuel.mortensonThanks for the feedback @artreaktor! How are you using this patch right now?
Comment #8
artreaktor CreditAttribution: artreaktor as a volunteer and commentedPage manager at /node/{node} and /taxonomy/term/{term} with per-domain variants.
Each variant uses entity_view plugin (view mode: full, IPE). Multilanguage.
Let me know if you need mode details.
Comment #9
samuel.mortensonComment #10
pifagor$container->get('user.private_tempstore'),
causing an error in CachedValuesGetterTrait.php
namely drain cached_values['page_variant'] = $page->getVariant($machine_name[1]);
because the $ page is empty.
if you replace $container->get('user.shared_tempstore'), it works.
Comment #11
pifagorComment #12
tim.plunkettPer discussion at the panels sprint, this is closed in favor of #2699085: Lock Panels IPE when a user has made TempStore changes