Help with Errors on my default.php file
Permalink
I restored a site from a back up file with a custom theme and I"m coming up with these two error messages:
Warning: Creating default object from empty value in /home/grapevine/public_html/themes/main/default.php on line 33
Fatal error: Call to undefined method stdClass::render() in /home/grapevine/public_html/themes/main/default.php on line 38
Is there anyone that could help or have any ideas on how to fix this? Site name ishttp://www.grapevinesolutions.com
Warning: Creating default object from empty value in /home/grapevine/public_html/themes/main/default.php on line 33
Fatal error: Call to undefined method stdClass::render() in /home/grapevine/public_html/themes/main/default.php on line 38
Is there anyone that could help or have any ideas on how to fix this? Site name ishttp://www.grapevinesolutions.com
Can you post the contents of that file?
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!doctype html>
<html><head>
<?php Loader::element('header_required'); ?>
<LINK REL="SHORTCUT ICON" href="<?=$this->getThemePath()?>/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=$this->getThemePath()?>/scripts/style.css">
<link rel="stylesheet" type="text/css" href="<?=$this->getThemePath()?>/scripts/semantic.min.css">
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700' rel='stylesheet' type='text/css'>
<script src="<?=$this->getThemePath()?>/js/showHide.js"></script>
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Maven+Pro:400,700:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); </script>
<meta charset="utf-8">
</head>
<div id="top-content-wrapper">
<div class="purple"></div>
<div class="container header">
<img src="<?=$this->getThemePath()?>/images/logo.png" class="logo">
<?php
$nav = BlockType::getByHandle('amiant_css3_menu');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'all';
$nav->controller->displaySubPageLevels = 'all';
$nav->controller->displaySubPageLevelsNum = 10;
$nav->render('view');
?>
</div>
<div id="slider">
<?php $a = new Area('Slider'); $a->setBlockLimit(1); $a->display($c); ?>
</div>
<div id="page-title" class="container">
<?php $c = Page::getCurrentPage();
$strDesc = $c->getCollectionDescription(); print($strDesc);?>
</div>
</div>
<div id="bottom-content-wrapper">
<div class="container main">
<?php $a = new Area('Main');$a->display($c);?>
</div>
</div>
<div id="footer-wrapper">
<div class="container footer">
<?php $a = new GlobalArea('Footer'); $a->setBlockLimit(3); $a->display($c); ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
<!doctype html>
<html><head>
<?php Loader::element('header_required'); ?>
<LINK REL="SHORTCUT ICON" href="<?=$this->getThemePath()?>/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=$this->getThemePath()?>/scripts/style.css">
<link rel="stylesheet" type="text/css" href="<?=$this->getThemePath()?>/scripts/semantic.min.css">
<link href='http://fonts.googleapis.com/css?family=Maven+Pro:400,700' rel='stylesheet' type='text/css'>
<script src="<?=$this->getThemePath()?>/js/showHide.js"></script>
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Maven+Pro:400,700:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); </script>
<meta charset="utf-8">
</head>
<div id="top-content-wrapper">
<div class="purple"></div>
<div class="container header">
<img src="<?=$this->getThemePath()?>/images/logo.png" class="logo">
<?php
$nav = BlockType::getByHandle('amiant_css3_menu');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'all';
$nav->controller->displaySubPageLevels = 'all';
$nav->controller->displaySubPageLevelsNum = 10;
$nav->render('view');
?>
</div>
<div id="slider">
<?php $a = new Area('Slider'); $a->setBlockLimit(1); $a->display($c); ?>
</div>
<div id="page-title" class="container">
<?php $c = Page::getCurrentPage();
$strDesc = $c->getCollectionDescription(); print($strDesc);?>
</div>
</div>
<div id="bottom-content-wrapper">
<div class="container main">
<?php $a = new Area('Main');$a->display($c);?>
</div>
</div>
<div id="footer-wrapper">
<div class="container footer">
<?php $a = new GlobalArea('Footer'); $a->setBlockLimit(3); $a->display($c); ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
Do you have a block with a handle of 'amiant_css3_menu' installed? This could have been an add-on package that didn't get reinstalled.
I’m not sure where would I look to see if that was installed?
If that was installed, you must be using an old version of c5, with which I am unfamiliar. There's bound to be a section in your c5 dashboard that lists extensions/add-ons or even block types.
If you've got access to the server file system, look in a directory called 'packages' (probably).
If you've got access to the server file system, look in a directory called 'packages' (probably).
Yes there is nothing in my packages folder is this something I could download?
I believe this is the packagehttps://www.concrete5.org/marketplace/addons/amiant-css3-menu...
Loaded it into the packages still no luck :(
So you downloaded the package, unzipped it, put it into the packages directory so that the path is /packages/package_name/controller.php and then you went into the Dashboard -> Extend Concrete5 and installed it?
Now it won't even let me login to dashboard keeps bringing me back to the site with errors
Comment out that block in your default.php until you get the package installed.
Ok How is that done?
Go into the files on the server, using FTP or something like that. Open that file and then add /* before that block and */ after that block, this will comment it out.
Like this doesn't seem to be cancelling out so I could get into the dashboard. Let me know when you can and Thank you for all your Help :)
*/
$nav = BlockType::getByHandle('amiant_css3_menu');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'all';
$nav->controller->displaySubPageLevels = 'all';
$nav->controller->displaySubPageLevelsNum = 10;
$nav->render('view');
*/
*/
$nav = BlockType::getByHandle('amiant_css3_menu');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'all';
$nav->controller->displaySubPageLevels = 'all';
$nav->controller->displaySubPageLevelsNum = 10;
$nav->render('view');
*/
Your first one needs to be /* to start the comment.