diff --git a/plugins/content_types/fieldable_panels_pane.inc b/plugins/content_types/fieldable_panels_pane.inc index e144bbb..46ad379 100644 --- a/plugins/content_types/fieldable_panels_pane.inc +++ b/plugins/content_types/fieldable_panels_pane.inc @@ -187,12 +187,38 @@ function fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_sub } fieldable_panels_panes_entity_edit_form_submit($form, $form_state); - if (!empty($entity->is_new)) { + + // @todo: This is here to show that this should be a setting somewhere, however, + // I was having a time figureing out the appropriate place to put it + // and what to call it exactly. This is only temporary and hopefully + // someone will have some ideas. this would only apply for things like + // panelizer pages so that a pane actually corresponds to revision of + // the node. When the entity is reusable we want it to act as if it + // were global. We should also add some type of notice on the form so + // it's not completely confusing for users. + $revision_context_aware = (empty($entity->reusable)) ? TRUE : FALSE; + + if (!empty($entity->is_new) || $revision_context_aware) { if (module_exists('uuid') && isset($entity->uuid)) { - $entity_id = 'uuid:' . $entity->uuid; + if ($revision_context_aware) { + // @todo: So I feel that this should be vuuid, however, when I tried + // the entity is never loaded back up, seems to work fine as + // just vid. I did briefly look, however, in the interest of + // time I stopped, hopefully someone else knows. + //$entity_id = 'vuuid:' . $entity->vuuid; + $entity_id = 'vid:' . $entity->vid; + } + else { + $entity_id = 'uuid:' . $entity->uuid; + } } else { - $entity_id = 'fpid:' . $entity->fpid; + if ($revision_context_aware) { + $entity_id = 'vid:' . $entity->vid; + } + else { + $entity_id = 'fpid:' . $entity->fpid; + } } // @todo -- this won't work if $form_state does not contain