0

I'm having a really strange issue working with one of the pages on a site.

The content isn't anything crazy or complex. It is a simple list of links. The issue I'm having is that it seems after a certain amount of content is added in, the page no longer loads properly. The template will load fine, but it will load as if there is no content contained on the page.

basically the issue is like this:

<ul>
<li><a href="#">List Item 1</a></li>
<li><a href="#">List Item 2</a></li>
<li>List Item 3</li>
</ul>

In this version, the page loads properly. However, as soon as I try to wrap the last list item, the page breaks. I've checked every possible syntax error and found nothing. I've tried wrapping by hand by typing out the tags myself as well as making use of the WP "link" function and still nothing.

I did try a version where I wrapped List Item 3 in an tag but removed list items 1 and 2 and the page loaded correctly further ruling out a syntax error.

I've also tried activating another template during which case the content shows up no problem. I'm almost 100% sure there's something interfering with the template file somehow but I've never encountered this issue before and I've used this template (U Design) many times before. I'm at a total loss for what to do or how to proceed here.

  • Check for errors in browser console, server log and turn debug on and look for obvious errors. – Pieter Goosen Apr 1 '15 at 6:27
0

In addition to checking logs make sure your php template file doesn't have any line breaks/extra lines after the very last php closing brace so something like this:

?>
"line break"
"line break"

The php file should end exactly after ?> From what i recall this will result in blank pages being rendered, it's tricky to detect and will make your hair turn gray fast.

  • Just checked this, all the page template files end in: <?php get_footer(); No closing ?>. Even with that added on, the issue persists, but none of the template files have a closing tag – Adam Apr 1 '15 at 6:50
  • Interesting, i assume you already checked different browsers? Are you running wordpress locally? If so, check if you have more than one php instance that is executing. I would add the closing tags to all templates btw. – td-lambda Apr 1 '15 at 7:00
  • No wordpress is running on a webserver. I have it set up the same way I've set it up countless times before and this is the first time this issue has come up. Added the ?> as advised but issue still remains – Adam Apr 1 '15 at 7:27
  • I would check the network calls to see if something is holding up the page from fully loading. In chrome go to the page in question, hit F12, go to Network tab and then refresh the page (F5). – td-lambda Apr 1 '15 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.