When you set layout to bundle default storage id gets changed to [entity_type]:[bundle]:default, but storage type remains "panelizer_entity" which isn't correct. Later when you try to edit this display it will check access using panelizer_entity_panels_storage_access which expect storage id to have entity id and you'll get access denied. Apparently we need to add code that changes storage type after saving display as default so it checks for access using panelizer_default_panels_storage_access.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sickness29 created an issue. See original summary.

sickness29’s picture

Patch for the issue.

sickness29’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

That's an interesting bug, thanks for providing a patch.

I think we'll need to put together tests to confirm the bug and confirm the patch fixes it.

Jorrit’s picture

I can reproduce the problem and confirm that this patch fixes the problem.

Jorrit’s picture

@sickness29: do you have time to add a test to panelizer.node.test?

aubjr_drupal’s picture

Extremely late response on this, but I've had to fix this issue in many databases across sites (after a database update in Panopoly that addressed other issues).

If nobody added a test to panelizer.node.test yet, and it'd mean that this gets ported into Panelizer as a patch upstream for sure, I'd be willing to give it a shot. Is that's all that is holding this up (no .test update)?