diff --git a/plugins/content_types/fieldable_panels_pane.inc b/plugins/content_types/fieldable_panels_pane.inc index f2f5502..24cd934 100644 --- a/plugins/content_types/fieldable_panels_pane.inc +++ b/plugins/content_types/fieldable_panels_pane.inc @@ -238,6 +238,13 @@ function fieldable_panels_panes_fieldable_panels_pane_content_type_edit_form_sub } } } + else { + // The current key will tell FPP to load up the current revision. This + // bypasses the entity cache on the FPP entity class and loads the revision + // that was just saved instead of the previous revision. This is only + // really relevant in panels IPE administration or similar circumstances. + $entity_id = 'current:' . $entity->fpid; + } // @todo: This won't work if $form_state does not contain 'pane' which could // theoretically happen in a non-Panels use case. Not that anybody uses this @@ -338,6 +345,10 @@ function _fieldable_panels_panes_load_entity($subtype_name) { $fpid = db_query('SELECT fpid FROM {fieldable_panels_panes_revision} WHERE vid = :vid', array(':vid' => $id))->fetchField(); $content = fieldable_panels_panes_load($fpid, $id); } + elseif($type == 'current') { + $vid = db_query('SELECT MAX(vid) FROM {fieldable_panels_panes_revision} WHERE fpid = :fpid', array(':fpid' => $id))->fetchField(); + $content = fieldable_panels_panes_load($id, $vid); + } else { $content = fieldable_panels_panes_load($id); }