Cannot edit some pages, others are fine

Permalink
Hey everyone. Got a site with a custom theme that was built a while back.http://www.atlantaeventcenter.com...

Problem, I cannot edit 4 of the pages. I can login to the dashboard, I can edit the index page, but when I try to edit some of the sub pages, I only get part of the page and the editor never loads. (see attached screenshots)

I've searched for answers but what I've found seem to apply all or nothing situations, not specific page problems like I'm having.

Additional info, when I View Source when logged in as admin, I only get the first 170 lines of code but when not logged in I get the full document and the site displays normally. For some reason the page doesn't load completely when in edit mode on the problem pages.

Any assistance would be greatly appreciated.

2 Attachments

DancinDirk
 
andrewjaff replied on at Permalink Reply
andrewjaff
Hi,

How was it before editing. or can you provide the details. so that i can check and let you what is the problem.

-Andrew
DancinDirk replied on at Permalink Reply
DancinDirk
http://atlantaeventcenter.com/catering

When not logged in the page loads.
when logged in as admin, and attempting to edit the page, only the first 170 lines or so load.
exchangecore replied on at Permalink Reply
exchangecore
When did this start happening? After an upgrade? After a modification? After a host migration? Knowing what triggered the failure might help us troubleshoot a little more.

If it was an upgrade, what version did you upgrade from and what version did you upgrade to?
DancinDirk replied on at Permalink Reply
DancinDirk
That's the question as we had not attempted to update the site in quite some time and had this problem waiting for us when we finally wanted to make an update.

I did perform an update in an attempt to resolve the problem but it didn't help.
exchangecore replied on at Permalink Reply
exchangecore
Does it only seem to be happening on certain page types maybe? Or maybe on pages that contain a certain block type?
DancinDirk replied on at Permalink Reply
DancinDirk
That's a great question! Sadly as I'm not the one who built the theme, I'm not sure how to answer. Could you give me some guidelines on how I could investigate this further?

Examples of working pages that I can edit
atlantaeventcenter.com (index)
atlantaeventcenter.com/about

Page that I cannot edit
atlantaeventcenter.com/catering
hutman replied on at Permalink Reply
hutman
If you are logged in you should be able to see what Page Type each page is by hovering over the Edit button on the front end and selecting the Design option, this will show you the selected page type.
DancinDirk replied on at Permalink Reply
DancinDirk
Sadly, no edit button shows (part of what's missing)

However looking at some pages that do work, it looks like each page has it's own page type. Not sure why they did it that way...
hutman replied on at Permalink Reply
hutman
Is there a certain block on these pages at the top?

This almost looks like it is a JS or PHP error in a block within the page that you are trying to edit, that only shows when the page is in Edit Mode.

If you open the Chrome Developer Tools and go to the Console tab do you see any javascript errors?
DancinDirk replied on at Permalink Reply
DancinDirk
No Errors showing on Console.

Whatever is causing the error is also causing the rest of the code not to load when in edit mode, it ends abruptly after a comment. Doing View Source while in edit mode shows about 170 lines of code and when not logged in, the page is around 500 lines.

I have looked at the source php surrounding that area but nothing is standing out as wrong.
hutman replied on at Permalink Reply
hutman
This sounds like a PHP error either in your Page Type or in one of the blocks.

Since we are not able to login could you either attach the source code for the page when it is not working, or tell us which comment is displaying just before the page stops?
DancinDirk replied on at Permalink Reply 1 Attachment
DancinDirk
Attached is the catering.php file.

Line 149
<!--- BIG IMAGE -->
is the last thing that shows when doing view source while in edit mode.
hutman replied on at Permalink Reply
hutman
Yikes, this does not follow any of the C5 rules! That's ok though, can you try adding this code at the very top of this file and see if it works with that?

<?php  
defined('C5_EXECUTE') or die(_("Access Denied.")); 
$c = Page::getCurrentPage();
?>
hutman replied on at Permalink Best Answer Reply
hutman
Actually, I think the problem is the period in the Area definition.

Try replacing line 150 with

<?php $a = new Area('Header Image'); $a->display($c); ?>
DancinDirk replied on at Permalink Reply
DancinDirk
You sir are a genius. I may have a follow up question about a different
page shortly.

On Tuesday, May 27, 2014, concrete5 Community <discussions@concretecms.com>
wrote:
hutman replied on at Permalink Reply
hutman
Did that work then?,
DancinDirk replied on at Permalink Reply
DancinDirk
Yes. Yes it did. But it also lead me to some other interesting practices by
the person who set it up. I may have more questions. About the "gallery".
Is there a good gallery block. It looks like he hard coded what's there
now.

On Tuesday, May 27, 2014, concrete5 Community <discussions@concretecms.com>
wrote:
DancinDirk replied on at Permalink Reply
DancinDirk
Dupe Post