Call to a member function error
PermalinkCall to a member function getRootTreeNodeObject() on a non-object
<?php defined('C5_EXECUTE') or die("Access Denied."); ?> <div class="ccm-block-topic-list-flat-filter"> <?php $node = $tree->getRootTreeNodeObject(); if (is_object($node)) { $node->populateDirectChildrenOnly(); ?> <ol class="breadcrumb"> <li><a href="<?php echo $view->controller->getTopicLink()?>" <?php if (!$selectedTopicID) { ?>class="ccm-block-topic-list-topic-selected active"<?php } ?>><?php echo t('All')?></a></li>
Every time i try to access the page now I get an error
An unexpected error occurred.
Call to a member function getRootTreeNodeObject() on a non-object
I believe its a Database entry which may have got confused? Any idea's any one?
Carl
By adding a check
if (is_object($tree)) {
around all the code, this can be fixed. We will include this fix in 5.7.5.1
here is my github bug:
https://github.com/concrete5/concrete5/issues/2675...
It basically means that $tree doesn't have a function called "getRootTreeNodeObject". This could be because the variable isn't set, or because it isn't an object.
You should check the controller.php. The controller should 'pass' the $tree variable to the view.