My website is having a bad day

The background image pulls up, but not the sidenav on the left or the main content area on the right. I’m pretty sure this broke when I was changing stuff in siteHeader.php But I went through the page with a fine toothed comb, so at this point I’m not sure if its a php issue or CSS issue.

Any ideas on how to narrow this one down?

Thanks!

http://www.e-downline.net/

seeing code would help find the problem.
When viewing your source code, the bottom half/60%, 70% whatever, is missing

It’s not really clear what the question is. All I see is a big background image, no navs or content areas. What do you mean by “pulls up”?

Try fixing these invalid comments. I’m seeing JS error when I visit that page, likely caused by these.

http://www.wonshik.com/files/c0rzbcqlie52tp.png

wonshikee, I fixed the invalid comments and the page is still not rending as it should. I checked it in IE 8 and also saw the javascript error. This is for a file I have never modified, as I bought these template from themeForest.com

Any other ideas on why the sidenav and the main content areas are not even pulling up? I’m guessing this is not a PHP error, otherwise the page wouldn’t even render the background image.

Thoughts?

Thanks!

The problem is the way the JavaScript is written, in your script.js file you have A LOT of document ready statements which is redundant but that’s not the issue. The issue is that your also loading the prototype library into the page, but because your loading everything within your <head></head> tags the jQuery declaration aka the dollar sign $ is been overwritten by the prototype library. The easiest way to get around this is to simply remove the prototype library itself otherwise change all instances of your jQuery dollar reference to the word jQuery.

See the below example of the line causing the JavaScript error:

if ($('.tweet_list').length>0){

The above line should be changed to:

if (jQuery('.tweet_list').length > 0){

Once you fix this error we will be able to help more as currently we cannot see the site at all, we can only see your background.

Ok, I removed the prototype library line and yet the page still does not pull up. Thank you for being patient, as I know PHP, but not javaScript. Would it help if I posted the whole siteHeader.php file? I know something in this file is the culprit, because no other page on my website works either, as they all reference this one file.

Thanks!

From the look of things now that the page doesn’t error out you have a PHP syntax error, if you could please post your PHP code so we can investigate it further.

Thank you Chris for you help in this!! Here is my siteHeader.php file:

<?php

include ‘startSession.php’;

$urlParts = explode(‘.’, $_SERVER[‘HTTP_HOST’]);
$subDomain = $urlParts[0];

$_SESSION[‘subDomain’] = $subDomain;

// Get variables from URL

$x = $_REQUEST[‘x’];
$guide = $_REQUEST[‘guide’];
$source = $_REQUEST[‘source’];
$fbID = $_REQUEST[‘fb_ref’];

// Store the Facebook referring ID if one exists

if (isset($fbID)) {

$_SESSION['fbID'] = $fbID;

}

// Grab variables out of the session

$uID = $_SESSION[‘uID’];
$subscription = $_SESSION[‘subscription’];
$personalPosts = $_SESSION[‘personalPosts’];
$memberType = $_SESSION[‘memberType’];
$tempLoginID = $_SESSION[‘tempLoginID’]; // So register won’t show to newly registered people

$guideID = $_SESSION[‘guideID’];
$guideCompany = $_SESSION[‘guideCompany’];
$guideURL = $_SESSION[‘guideURL’];
$guideFirstName = $_SESSION[‘guideFirstName’];
$guideLastName = $_SESSION[‘guideLastName’];
$guidePhone = $_SESSION[‘guidePhone’];
$guideEmail = $_SESSION[‘guideEmail’];
$guideReferral = $_SESSION[‘guideReferral’];
$guideSubscription = $_SESSION[‘guideSubscription’];

// Do we show them advertising?

if (!$memberType && $guideSubscription != “Gold”) {

$showAds = "Yes";

}

if (!$guideID && !$subscription) {

$showAds = "Yes";

}

if ($uID && ($subscription == “Free” || !$subscription) ) {

$showAds = "Yes";

}

// Count the number of testimonials and users

if (!isset($totalPosts)) {
$countTestimonials = “select count(*) as total from testimonies”;
$result = mysql_query($countTestimonials) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$totalPosts = $row[‘total’];
$totalPosts = number_format($totalPosts);
$_SESSION[‘totalPosts’] = $totalPosts;
}

if (!isset($totalUsers)) {
$countUsers = “select count(*) as total from users”;
$result = mysql_query($countUsers) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$totalUsers = $row[‘total’];
$totalUsers = number_format($totalUsers);
$_SESSION[‘totalUsers’] = $totalUsers;
}

// How did they find the website?

$referURL = $_SERVER[‘HTTP_REFERER’];

if ($referURL) {

if (!isset($_SESSION['referrer'])) {
	
	$_SESSION['referrer'] =  $referURL;
}

}

if ($guideReferral == “Invite Referral”) {

$_SESSION['referrer'] =  "Invite Referral";

}

if ($guideReferral == “Testimonial Referral”) {

$_SESSION['referrer'] =  "Testimonial Referral";

}

// Lookup guide if sponsor is used in the URL

if (isset($sponsor)) {

$locateID = "SELECT uID from users where uID = $guide limit 1";
$result = mysql_query($locateID) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$uID = $row['uID'];
$_SESSION['guideID'] = $uID;

}

// Lookup guide if source is used in the URL

if (isset($source)) {
$locateID = “SELECT uID from users where uID = $source limit 1”;
$result = mysql_query($locateID) or die(mysql_error());
$row = mysql_fetch_assoc($result);
$uID = $row[‘uID’];
$_SESSION[‘guideID’] = $uID;
}

// Lookup the guide if an x or fb_ref is in the URL. Don’t user their uID anymore, just YL number

if (isset($x)) {

$lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$x' limit 1";

}

if (isset($fbID)) {

$lookupGuide = "SELECT uID, companyName, companyURL, firstname, lastname, email, phone, membernumber, subscription from users where membernumber = '$fbID' limit 1";

}

if (isset($x) || (isset($fbID))) {

$result = mysql_query($lookupGuide) OR die(mysql_error());

if ($row = mysql_fetch_array($result)) {

	do {
	
		$_SESSION['guideID']			= $row['uID'];
		$_SESSION['guideFirstName']		= $row["firstname"];
		$_SESSION['guideLastName']		= $row["lastname"];
		$_SESSION['guideEmail']			= $row["email"];
		$_SESSION['guidePhone']			= $row["phone"];
		$_SESSION['guideCompanyName']	= $row["companyName"];
		$_SESSION['guideCompanyURL']	= $row["companyURL"];
		$_SESSION['guideMemberNumber']	= $row["membernumber"];
		$_SESSION['guideSubscription']	= $row["subscription"];
	
	} while($row = mysql_fetch_array($result));

} // end if results

} // end if (isset($x) || (isset($fbID)))

// Start the html for the page

print ("<!DOCTYPE html PUBLIC ‘-//W3C//DTD XHTML 1.0 Strict//EN’ ‘http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd’>
“);
print (”<html xmlns=‘http://www.w3.org/1999/xhtml’ lang=‘en-us’>

");

print ("<head>

");

print (“<title>”);

if ($title) {

$title = htmlentities($title, ENT_QUOTES);
print ("$title");

}

else {

print ("Essential Oils &amp; Aromatherapy Testimonials");

}

print ("</title>

");

print ("<meta http-equiv=‘classification’ content=‘Essential Oils’ />
“);
print (”<meta http-equiv=‘content-type’ content=‘text/html;charset=UTF-8’ />
“);
print (”<meta name=‘keywords’ content=‘essential oils, aromatherapy testimonials, essential oil’ />
“);
print (”<meta name=‘google-site-verification’ content=‘x-Z0TUunm2aSgxhwwyLgnWVCgoyhSGITjfF-V5z6M_k’ />
");

if ($metaDescription) {

$metaDescription = htmlentities($metaDescription, ENT_QUOTES);

print ("&lt;meta name='description' content='$metaDescription' /&gt; \

");
}

else {

$metaDescription = "Essential oils contain healing properties.  Come read how others are using them on a daily basis to achieve health and well being.  Share what you know, and learn what you don't.";

$metaDescription = htmlentities($metaDescription, ENT_QUOTES);

print ("&lt;meta name='description' content='$metaDescription' /&gt; \

");
}

// Tags for Facebook when a testimonial is being viewed

if ($testimonyFirstName) {

print ("&lt;meta property='og:title' content='$title' /&gt; \

“);
print (”<meta property=‘og:author’ content=‘$testimonialFirstName $testimonialLastName’ />
“);
print (”<meta property=‘og:type’ content=‘article’ />
“);
print (”<meta property=‘og:url’ content=‘$canonical’ />
“);
print (”<meta property=‘og:image’ content=‘http://www.oil-testimonials.com/images/facebook.jpg’ />
“);
print (”<meta property=‘og:site_name’ content=‘Oil-Testimonials.com’ />
“);
print (”<meta property=‘og:description’ content=‘$metaDescription’ />

");
}

if ($mainPage == “Yes”) {

print ("&lt;link rel='canonical' href='http://www.oil-testimonials.com' /&gt; \

");
}

?>

&lt;link rel='image_src' href='http://www.essentialoilshoppe.com/images/oil%20bottle.jpg' /&gt;
&lt;link rel='stylesheet' id='theme-reset-css'  href='css/reset.css' type='text/css' media='all' /&gt;
&lt;link rel='stylesheet' id='theme-style-all-css'  href='css/style.css' type='text/css' media='all' /&gt;
&lt;link rel='stylesheet' id='prettyPhoto-css'  href='css/prettyPhoto.css' type='text/css' media='screen' /&gt;
&lt;link rel='stylesheet' id='jquery-popeye-style-css'  href='css/jquery.popeye.style.css' type='text/css' media='all' /&gt;
&lt;link rel='stylesheet' id='jquery-popeye-css'  href='css/jquery.popeye.css' type='text/css' media='all' /&gt;
&lt;link rel='stylesheet' id='jquery-colortip-css'  href='css/colortip-1.0-jquery.css' type='text/css' media='all' /&gt;
&lt;link rel='stylesheet' id='nivo-slider-css'  href='css/nivo-slider.css' type='text/css' media='all' /&gt;


&lt;!--[if IE 7]&gt;
&lt;link rel='stylesheet' id='theme-ie7-css'  href='css/ie7.css' type='text/css' media='screen' /&gt;
&lt;![endif]--&gt;
&lt;!--[if lte IE 8]&gt;
&lt;link rel='stylesheet' id='theme-lte8-css'  href='css/ie.css' type='text/css' media='screen' /&gt;
&lt;![endif]--&gt;

&lt;script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.easing.1.3.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.cycle.all.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.tools.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.prettyPhoto.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/menu_min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/colortip-1.0-jquery.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.popeye-2.0.4.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.validate.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.form.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.tweet.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jflickrfeed.min.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/jquery.nivo.slider.pack.js'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='js/script.js'&gt;&lt;/script&gt;


&lt;!--For the lightbbox--&gt;

&lt;?php
//&lt;script type='text/javascript' src='javaScripts/prototype.js'&gt;&lt;/script&gt;
?&gt;
&lt;script type='text/javascript' src='javaScripts/lightbox.js'&gt;&lt;/script&gt;

&lt;!--For the row hiliter--&gt;
&lt;script type='text/javascript' src='javaScripts/rowHighlighter.js'&gt;&lt;/script&gt;

</head>

<!-- google analytics –>
<script type=“text/javascript”>

var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-30483100-1’]);
_gaq.push([‘_trackPageview’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

<body class=“green-skin”>

<!-- container –>
<div id=“container”>

&lt;!-- background holder --&gt;
&lt;div class="background_pic_border"&gt;
	
	&lt;!-- background image --&gt;	
	&lt;div class="background_pic_holder"&gt;
		&lt;img src="images/assets/background.jpg" width="100%" alt="lavender fields for essential oils" /&gt;
	&lt;/div&gt;
	
	&lt;!-- background curv graphic --&gt;
	&lt;div class="back-curv"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;!-- end div .background image --&gt; 

	
&lt;!-- wrapper --&gt;
&lt;div id="wrapper"&gt;

I didn’t see a code button to encapsulate my code. I guess sitepoint.com get rid of that.

Nope the error isn’t in there as your page is only loading up until your #wrapper element so the error is occurring somewhere in your body content.

EDIT: You need to go into the advanced editor to get the code buttons.

My index.php is setup like this:

include siteHeader.php

include siteNav.php

html related to this specific page

include footer.php

So the reason it is only rendering up to the #wrapper is because that is the very last line of my siteHeader.php. Ugh, what else could it be?

I’m good to go now. There was a small php error in sideNav.php Thanks everyone!