If I try to reset to default, nothing happens.

Drupal 7.16
Panels 7.x-3.3

Comments

Exploratus’s picture

Either the same thing is happening to me or I dont know how to use the module.

damienmckenna’s picture

Title: Panelizer Reset On Full Page Overview » "Reset to defaults" doesn't work

Clarifying the title.

samhassell’s picture

Are you guys using entitycache?

merlinofchaos’s picture

Status: Active » Closed (duplicate)

Right now, the 'reset to defaults' button actually *does* reset to a default state, but it gives no message or other indication that it does anything. The only way you can tell is to check to see if any modifications you made to the panelizer state have been changed. There is an issue to address this here: #1515428: "Reset to defaults" should have a confirmation step with a description

a.milkovsky’s picture

Are you guys using entitycache?

I'm using it. And need to flush cache on each panelizer reset. Otherwise I can't see changes

a.milkovsky’s picture

Issue tags: +panelizer

If you use entitycache module you need to flush it on each panalizer reset.

Add your submit in 'panelizer_reset_entity_form':

function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
  if($form_id == 'panelizer_reset_entity_form') {
    $form['#submit'][] = '_MYMODULE_panelizer_reset_entity_submit';
  }
}

than focre entitycache flush

function _MYMODULE_panelizer_reset_entity_submit($form, $form_state) {
  if(module_exists('entitycache')) {
    $entities = entitycache_supported_core_entities(TRUE);
    foreach (array_keys($entities) as $type) {
      cache_clear_all('*', "cache_entity_{$type}", TRUE);
    }
  }
}
fago’s picture

damienmckenna’s picture

Issue summary: View changes
Issue tags: -panelizer