Cannot access protected property Content::$mHierarchyPath

Post Reply
brunettdan
New Member
New Member
Posts: 9
Joined: Fri Jun 01, 2012 2:54 pm

Cannot access protected property Content::$mHierarchyPath

Post by brunettdan »

Getting the following error when trying to use a UDT which worked in previous versions (1.9.4.1)

mod_fcgid: stderr: PHP Fatal error: Cannot access protected property Content::$mHierarchyPath in /xxx/xxx/public_html/lib/classes/class.usertagoperations.inc.php(265) : eval()'d code on line 4

UDT I'm trying to use:

Code: Select all

global $smarty;
$op = $smarty->get_template_vars('content_obj');
$current_id = $smarty->get_template_vars('content_id');
$temp = explode('/', $op->mHierarchyPath);
$root_alias = $temp[0];
$temp = explode('.', $op->mIdHierarchy);
$root_id = $temp[0];
if ($temp[0] == $current_id){
$is_root = 1;
$page_level = 1;
}
else{
  $is_root = 0;
  $page_level = array_search($current_id, $temp, true);
  $page_level++;
}
$smarty->assign('language',$root_alias);
Also tried cloning $op->mHierarchyPath, as well as $op->mHierarchyPath(). None worked. Any suggestions?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Cannot access protected property Content::$mHierarchyPat

Post by calguy1000 »

We invalidated most (if not all) access to properties such as this in CMSMS 1.10. Properties of content objects are now protected or private. You must use the appropriate accessors now.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
brunettdan
New Member
New Member
Posts: 9
Joined: Fri Jun 01, 2012 2:54 pm

Re: Cannot access protected property Content::$mHierarchyPat

Post by brunettdan »

Post Reply

Return to “Closed Issues”