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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

samuel.mortenson created an issue. See original summary.

samuel.mortenson’s picture

Uploading a similar patch for Panelizer, based on the open default wizard work being done in #2664682: Implement admin UI for editing Panelizer defaults.

The last submitted patch, panels-use-private-tempstore.patch, failed testing.

samuel.mortenson’s picture

Ignore the previous Panelizer patch, I think we'll only need to change this in Panels.

artreaktor’s picture

#3 is working for me, thanks!

samuel.mortenson’s picture

Thanks for the feedback @artreaktor! How are you using this patch right now?

The last submitted patch, panels-use-private-tempstore.patch, failed testing.

artreaktor’s picture

Page 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.

samuel.mortenson’s picture

pifagor’s picture

Status: Needs review » Needs work
FileSize
106.71 KB

$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.

pifagor’s picture

FileSize
108.79 KB
tim.plunkett’s picture

Status: Needs work » Closed (duplicate)

Per discussion at the panels sprint, this is closed in favor of #2699085: Lock Panels IPE when a user has made TempStore changes