When selecting a view mode for a block using the IPE for the second time WITHOUT saving the page, the original selection of view mode is kept. This does work however the first time.

Steps to reproduce

Add block to panel page (any view mode)
Save page

Using IPE
Place content
On screen
Select block in question and change view mode
(for me i need to refresh as css doesnt load right, this is a separate issue)
New view mode is selected..

WITHOUT saving, repeat the view mode change, it doesn't work for this block nor any other on the page.
Now SAVE the page, you should be able to change the view mode once before having to save after each try.

Ill be watching this closely, please ping me if you need more info or have an idea where to start debugging this, i am happy to contribute my time here to get this fix in.

Thanks,
Z

Comments

zach.bimson created an issue. See original summary.

zach.bimson’s picture

samuel.mortenson’s picture

Hey @zach.bimson, what kind of Blocks are you placing? I'm guessing this is an issue specifically with Panelizer fields, but I just want to make sure before moving forward.

zach.bimson’s picture

Sorry for the delay on this, totally forgot about your reply.
The default view mode on the content type has been panelized
The block is a custom block_content type built using the ui

Let me know if you need anything else...

Thanks,
Z

samuel.mortenson’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

This is way broader than I thought, and seems to affect every Block Plugin's setting!

From debugging, it looks like submitting the Block's configuration form before setting the Panels Display's configuration from TempStore clears the Block Instance's configuration, which is why this was occurring. I'm surprised this hasn't come up earlier, we must have introduced this fairly recently.

At any rate, if you could confirm that this patch fixes you issue I'll commit it ASAP, thanks for the report!

samuel.mortenson’s picture

Status: Needs review » Fixed

I went ahead and committed this as it was blocking other debugging and was critical to IPE use/testing. We need JS testing ASAP :/

  • samuel.mortenson committed b3f8bde on 8.x-3.x
    Issue #2681075 by samuel.mortenson: Panels IPE block view mode selection...
zach.bimson’s picture

Again, sorry for the delay! I've tested and it works great! thanks for sorting this so quick.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.