On some of my node edit pages that have been panelized I end up with multiple view mode select lists in the Panelizer defaults widget, even though looking at the list of view modes on the Panelizer tab, there's only one being used.

I imagine they must appear if I've tinkered with a particular view mode but deleted it, yet on the node edit page, the panelizer select lists still show up for these unused view modes.

Is there some way of making the unused ones go away?

Comments

merlinofchaos’s picture

Category: feature » bug

That sounds like a bug. I might have to figure out how to replicate it to address it, though.

mediaformat’s picture

I had the same issue of leftover view-mode select list, I went back to Panelizer settings, unchecked the 'Allow Panel Choice' option for the guilty view.
In my case I had to re-panelize the view to get the option!

damienmckenna’s picture

damienmckenna’s picture

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new8.61 KB

This includes an update script to fix all variables, some logic updates to prevent the options from loading on the entity form and and entity bundle settings page.

damienmckenna’s picture

Both my own testing, and a report from @dags, indicate this resolves #1784032: "Create new revison" causes panelizer to revert to defaults, so I've marked it as a duplicate.

I have a few additional use cases to test, then I'll be committing this.

damienmckenna’s picture

Status: Needs review » Needs work

Needs a little more work - if multiple view modes are panelized, any customizations are still reverted upon save.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new10.83 KB

This appears to work pretty well now, I've tried it with all possible combinations of settings for two different view modes, covering scenarios where both are using default displays, one is using one of the other displays, one is using a customized display, both are using customized displays. I'm sure someone (*cough* merlinofchaos *cough*) could point out another way of handling this, but it works.

damienmckenna’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

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