//check the page link is duplicate, then return error
if(!empty($request['page_link'])){
$x = DB_DataObject::factory('cms_page');
- $x->page_type_id = $this->page_type_id; // make sure they are of the same type..
+
+ $eid = DB_DataObject::factory('core_enum')->lookup('cms_page_type', 'element');
+
+ if($this->page_type_id != $eid){
+ $x->page_type_id = $this->page_type_id; // make sure they are of the same type..
+ }
+
if($x->get('page_link', $request['page_link']) && ($old->page_link != $request['page_link'])){
$roo->jerr('Sorry, this page link is existing on the system.');
}