Forums / General Questions / Only the HEAD section is being built on page render

Only the HEAD section is being built on page render

Locked

Views: 786

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
20 Mar 2008, 11:03 AM
#1
robgt avatar

robgt

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Only the HEAD section is being built on page render

Hi Guys,
I'm in process of modifying a site (still can't share the URL I'm afraid, but the info here will hopefully help someone help me?).
It was all going really well and I'm at the finishing touches stage.
My usual process of development when tweaking things in code/css/admin is to make a change and refresh the page to see what happened.
The site I'm working on suddenly developed a major problem in that the only code now being generated at page render is the HEAD section. I get everything down to the closing HEAD tag, and thats it - no BODY tag and nothing from there onwards... blank page.

:oops::censored:

I was shocked when this happened - I thought some external force had affected it, but it must have been something I've done as I know that nothing else was beng done on the site by anyone at the time. No database upgrades, no site files updates - nothing changed in the database (other than adding a couple of new categories and images I'm told). I could understand this potentially breaking something further down the render stream, but not chopping things off before the BODY tag?

So, I'm after some advice as to which files I should check that are going to affect this portion of the render stream. I'm getting a better undestanding of the system as a whole, but there's so many files that it can be a little overwhelming sometimes.

I've found the file that actually outputs the BODY tag (php), but couldn't see anything wrong in there last night, although it was getting very late... but there's no override for this file in the site so if it does have a fault in there now (maybe I edited it accidentally?) then it will be in this file.
Bearing in mind that I haven't modified this file (to my knowledge), I'm stumped as to what went wrong.

I recall being in the admin system at the time, looking int modifying the home page of the site (centre panel contents) - added some text to the relevant define_main_page.php file (via admin) saved it, checked it, saw what it affected and where, removed the text again... somewhere after I did this, it went pear shaped. Admin still works fine.

Currently, I'm looking at taking a copy of all my modified files (for safe keeping) - re-uploading the original zen cart site to make sure that works, then uploading my changed files/overrides one at a time until it breaks again. :cry:

In the meantime (as I can't get to do this until late this evening - approx 10 hours from now) - I was hoping that maybe someone else has done something similar and might knwo what it is that I've done, and how to fix it :D

Sorry for the really long post - there's a lot of detail needed for solving these sorts of issues and I've probably only scratched the surface!

Cheers,
Rob

20 Mar 2008, 11:20 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Only the HEAD section is being built on page render

Try the debug logging tool mentioned in step 2 of this FAQ:
https://www.zen-cart.com/tutorials/index.php?article=82

The log should help you find out what's croaking where.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Mar 2008, 1:19 PM
#3
robgt avatar

robgt

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Only the HEAD section is being built on page render

Thanks - I'll try these steps when I get back to it later.

Huge apologies for not reading that FAQ :blush: - I searched the forums for quite a while but found nothing suitable... :frusty:
Cheers,
Rob

20 Mar 2008, 10:44 PM
#4
robgt avatar

robgt

New Zenner

Join Date:
Dec 2007
Posts:
27
Plugin Contributions:
0

Re: Only the HEAD section is being built on page render

Thanks for that useful debug page!
I managed to isolate the issue and get the site working perfectly again :)
I had somehow managed to move an incorrect tpl_main_page.php into my template/common folder... um, disaster!:censored:

Found and fixed :clap:
Much appreciated.
Cheers,
Rob