Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed non versioned ModelAdmin loading

  • Loading branch information...
commit 782f12537633c5df62872f5e02d3cf33a855cbee 1 parent 6500206
@arambalakjian authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 code/ModelAdmin/DataObjectAsPageAdmin.php
View
8 code/ModelAdmin/DataObjectAsPageAdmin.php
@@ -6,8 +6,12 @@ class DataObjectAsPageAdmin extends ModelAdmin
public function init()
{
parent::init();
-
- Versioned::reading_stage('Stage');
+
+ //if versioned we need to tell ModelAdmin to read from stage
+ if(Singleton($this->modelClass)->isVersioned)
+ {
+ Versioned::reading_stage('Stage');
+ }
//Styling for preview links and status
Requirements::CSS(MOD_DOAP_DIR . '/css/dataobjectaspageadmin.css');
}
Please sign in to comment.
Something went wrong with that request. Please try again.