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

 
hutman replied on at Permalink Reply
hutman
Can you post the contents of that file?
jfraenza replied on at Permalink Reply
<?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>
Gondwana replied on at Permalink Reply
Gondwana
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.
jfraenza replied on at Permalink Reply
I’m not sure where would I look to see if that was installed?
Gondwana replied on at Permalink Reply
Gondwana
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).
jfraenza replied on at Permalink Reply
Yes there is nothing in my packages folder is this something I could download?
hutman replied on at Permalink Reply
hutman
jfraenza replied on at Permalink Reply
Loaded it into the packages still no luck :(
hutman replied on at Permalink Reply
hutman
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?
jfraenza replied on at Permalink Reply
Now it won't even let me login to dashboard keeps bringing me back to the site with errors
hutman replied on at Permalink Reply
hutman
Comment out that block in your default.php until you get the package installed.
jfraenza replied on at Permalink Reply
Ok How is that done?
hutman replied on at Permalink Reply
hutman
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.
jfraenza replied on at Permalink Reply
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');
*/
hutman replied on at Permalink Reply
hutman
Your first one needs to be /* to start the comment.