Internal Server Error after assigning a block to all Child Pages from Page Defaults

Permalink
I've spent countless hours (2 days) of searching for a solution to my problem. I had almost completed my client's site when I decided to edit my Right Sidebar page defaults. I clicked on a block and clicked on Setup on Child Pages. I checked all child pages. Everything was working fine, but when I hit OK, my site broke. I started getting a 500 Internal Server Error on ALL the subpages of my site (they were all using the right sidebar page type).

I cleared the cache...checked the Error Logs on Host Gator...spoke to Host Gator's customer service....no luck. They found nothing wrong with the site.

Luckily, I still had access to the dashboard. I began playing around and applied another theme to my site and like magic, the subpages once again became functional. So I went back to my custom theme, and then went to my file structure in Dreamweaver. I went into my elements/header.php file and removed this little chunk of code (the same code for the block that I was trying to assign to Child Pages when the site broke)

<?php
$a = new Area('Mission');
$a->setBlockLimit(2);
$a->display($c);
?>

And voila!!!!! everything started working again!!!! (The code was located in my header.php because it was a mission statement located in the top of all my pages)

My theory is that I deleted a page on my site earlier that day and that deleted page was still showing up in the list of child pages to which I later assigned my block. Concrete5 couldn't find the missing page, and bam, everything broke.

It was such a simple solution but trust me, I found no documentation on it, and I had to do a lot of trial and error testing before figuring out what was wrong. If you ever have an error that you just can't resolve, and your dashboard is accessible, I strongly advise you to change the theme and see if the problem persists.

Hope this helps someone!!!!!!

mehreenbaakza