ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Page blank even with debugging turned on

August 23, 2011 9:36am

Subscribe [5]
  • #1 / Aug 23, 2011 9:36am

    jareep

    8 posts

    Cross posting from the EECore forum because I didn’t have access to this forum until late last night.  Here goes:

    We migrated to a new web host this weekend and ever since then, 2 pages of our website do not function.  The page is white with no errors, not even with debugging turned on.  No errors in the error.log file either.  The page is:  http://www.learningfocused.com/index.php/resources/learning-focused-clients

    A working version can be found on our original web host at:  http://new.www.learningfocused.com/index.php/resources/learning-focused-clients

    On the new host, I’ve even blanked the template to be empty only displaying the words “Test” and still get nothing.  Any assistance would be most appreciated.  Thanks.

    Additional Info:
    Old server PHP version is 5.1.6 and new version is 5.2.17 running EE 1.6.9 both running on Linux Apache2

    UPDATE:
    Apparently, this is the offending code:

    <div class="accordion">
                                                    <h3>{if schools_have_data == "Yes"}/images/icons/chart_bar.png{if:else}/images/icons/blank.png{/if} {if show_data == "Yes"}<span>/images/icons/magnifier.png</span>{if:else}/images/icons/blank.png{/if}<a href="#%22class=%22read-more1" class="read-more1 active">{title}</a></h3>
    
    <p></div>

    If I remove the DIV surrounding the H3 tag, the page loads, however, it isn’t formatted correctly due to missing some of the other HTML tags needed.  Any thoughts as to why a DIV would cause EE to display a blank page with 0 errors?

  • #2 / Aug 23, 2011 1:35pm

    jareep

    8 posts

    I removed all HTML and just left in the EE code which is below:

    {exp:weblog:entries weblog="partner_states" disable="member_data|pagination|trackbacks" sort="asc" orderby="url_title"} 
         {reverse_related_entries id="district" sort="asc" orderby="url_title"}
        {if no_reverse_related_entries}No data available.{/if}
        {title}
        {embed=embeds/res_schools entry_ids=" {entry_id}"}
         {/reverse_related_entries}
    {/exp:weblog:entries}

    This code works fine. However, when I wrap it in HTML I still get the blank page.  Any assistance would be most helpful!  Thanks.

  • #3 / Aug 23, 2011 2:19pm

    jareep

    8 posts

    UPDATE
    Ok, so I walked through every single line that gets included in the template and traced the problem to our header template.  In order to correct the issue, I simply removed the opening BODY tag.  If I remove that, the page loads correctly as it did on our previous host.  Any thoughts as to why adding a body tag breaks EE?  I’d prefer not to have to work around the problem in this manner, but am fully prepared should I need to.

  • #4 / Aug 23, 2011 8:02pm

    Dan Decker

    7338 posts

    Hi jareep,

    Are you seeing this in any particular browser? Removing the body tag would not be desirable. Can you post the contents of your original header include?

    Cheers,

  • #5 / Aug 23, 2011 8:27pm

    jareep

    8 posts

    It isn’t browser specific.  Tried it in Firefox6, Chrome, and IE9.  The header is attached.

    As a test, I removed the class attributes from the body tag and made it a simple body tag with no luck.  Until I can figure out the issue, I modified the templates for the 2 broken pages to not include the main header but to hardcode the header (minus the body tag) just for those 2 pages.  Obviously not desirable.  The header works on EVERY other page on the site.  =/  If needed, I can paste one of the offending pages or give access to the site for you to take a look at.

  • #6 / Aug 24, 2011 6:39pm

    Dan Decker

    7338 posts

    jareep,

    Ahh, so you have some EE code going on in the body tags! The plot thickens. Your blanking issue is likely tied to malformed conditionals. If EE can’t resolve the condition, I’ve seen it output nothing, like your issue here.

    Can you give this a try?

    <body{if {segment_1} == ""} class='home'{if:elseif {segment_1} == "professional-development"} class="pd-home"{/if}>

    Let us know if that clears it up for you.

    Cheers,

  • #7 / Aug 25, 2011 11:52am

    jareep

    8 posts

    Nope, that didn’t help.  As a matter of fact, I changed the complicated body tag to just

    <body>

    And even this caused the same problem.  Any other suggestions?

  • #8 / Aug 25, 2011 12:32pm

    Mark Bowen

    12637 posts

    Be careful with copying and pasting the code from the above post as the forum has changed a few of the characters, most notably the quote marks. Definitely would be best to type it in manually if you didn’t already. [Mod Edit: Code fixed in post above.]

    After that I’d most definitely advise to check the page out using the online W3C Validator Service as you currently have 689 errors with 14 warnings which is an immense amount of errors to have on one page.

    Not all of them will be needed to be fixed as it’s not always possible to get rid of all of them due to many different reasons however you do have that page set as a strict doctype and so any tiny error in code will result in major problems on the rendering side of things.

    I’d advise seeing if any of those errors are related and if not then break down your page to the simplest possible code you can get away with and then add parts back in again slowly until you find what breaks it. You should then be able to fix it quite easily or let us know what the problem was and the corresponding code and hopefully someone can help get you going again.

    As Dan has mentioned above though taking out the opening body tag is definitely not a good idea and really it shouldn’t be causing your page to blank out like that if it is in there so there’s definitely something else going on somewhere.

    You don’t perhaps have another opening body tag in the main template as well do you?

    Best wishes,

    Mark

  • #9 / Aug 26, 2011 2:00pm

    Lisa Wess

    20502 posts

    Thanks for the assistance, Mark!

    jareep - Mark is spot on, the answers to those questions are definitely a great step forward in the troubleshooting process.  Please let us know what you find out.

  • #10 / Aug 26, 2011 2:45pm

    jareep

    8 posts

    I have fixed all by 24 of the errors with the same result (which are mostly missing alt tags, etc).  The page on the old host is still available and it has the same high number of errors (688) and it renders perfectly.  Here is a link to the page still available on our old host:
    http://new.www.learningfocused.com/index.php/resources/learning-focused-clients

    I have checked for double body tags and there are none.  Any other suggestions?

  • #11 / Aug 26, 2011 3:06pm

    Mark Bowen

    12637 posts

    You said in your first post that the page was rendering blank even if you just placed the single word Test into the template?

    Is that still the case? If so then there’s definitely something weird going on there as out of the box you should be able to place just plain text into a template and it will render directly to the page when you visit it in a browser.

    I must admit I’m finding it difficult to know which page is which as they are both displaying and neither of the links shows a blank page so it’s a bit difficult to tell what’s going on here.

    I did copy / paste all the code from the one page though and placed it into a test.html file with the missing <body> tag placed in and it showed up fine so it definitely seems like there’s still something else quite odd going on here.

    Perhaps try making a brand new test template and just place some text into it. After that visit the template in your browser and see if that text shows up. If it does (which if everything in the system is working correctly) then that means there’s something going on with those other templates for some reason. If it doesn’t show up then that will definitely mean there’s something going on elsewhere which definitely needs looking into.

    You don’t have a .htaccess file in place on the site do you? I can see that the links have index.php in them but I’m just wondering if there’s anything in there that might be causing this although to tell the truth I can’t quite think of what. Definitely worth a try taking it out of the equation if you do have one though.

    Best wishes,

    Mark

  • #12 / Aug 26, 2011 3:12pm

    jareep

    8 posts

    No, that is no longer the case.  Apparently, I was mistaken.  I blanked the template and added the header and footer include and then Test and it displayed fine.  The reason the pages both display correct at those links is 2 folder:  1:  The http://new.www link is actually still located on our OLD host and we never had a problem with the page there.  2:  I hardcoded the header information (removing the body tag) for the time being so that the page displays for our users.  Besides, I figured that seeing an empty white page would not be much use to you to troubleshoot.

  • #13 / Aug 29, 2011 12:28pm

    Kevin Smith

    4784 posts

    Hi jareep,

    You’re right, troubleshooting from afar on this one’s gonna be difficult. Be on the lookout for an email from me, and we’ll see what we can find.

  • #14 / Aug 29, 2011 2:52pm

    jareep

    8 posts

    Login request submitted.  Feel free to play around with the resources/test template.  Thanks!

  • #15 / Aug 29, 2011 7:10pm

    Kevin Smith

    4784 posts

    Hi jareep,

    I took a look at your site, and I think your ultimate solution is going to be to simplify your templates and code A LOT. For example, you’ve got 1955 queries running on this single page. That alone can choke a page load. In addition, you have quite a few very complicated conditionals within your page.

    Specifically with your page, it looks like the offending elements are actually all the divs inside the <div class=“accordion”> element rather than the element itself. That shouldn’t cause an issue, of course, but with a page weighed down with as much as you’ve got, it’s nearly impossible to figure out why.

    My recommendation is to optimize your page as much as possible. I’m not exactly sure what you need to do, but I can’t imagine a page in EE that needs 1955 queries on it. Simpler is better. Get as simple as possible.

    I think simplifying your tags and conditionals will get you a lot closer to figuring out this issue.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases