Broke website - need help quickly please!
Made a change to \includes\templates\avignon\common\tpl_header.php
broke the page completely... just shows a blank page.
restored with backup file... no change.
Here is the code:
PHP Code:
<?php
/**
* Common Template - tpl_header.php
*
* this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* make a directory /templates/my_template/privacy<br />
* copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
* to override the global settings and turn off the footer un-comment the following line:<br />
* <br />
* $flag_disable_header = true;<br />
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
*/
?>
<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
?>
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
<ul class="back">
<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?><//li>
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->
<!--bof-branding display-->
<div id="logoWrapper">
<address style="float:right; text-align:right; margin: 105px 40px 1px 1px; font-weight:bold;"><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<div class="headerTitle"><h1 class="shadow"><?php echo ; ?></h1><h1><?php echo ; ?></h1></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="taglineWrapper">
<?php
if (HEADER_SALES_TEXT != '') {
?>
<div id="tagline"><?php echo ;?></div>
<?php
}
?>
</div>
<br class="clearBoth" />
<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
<!--eof-branding display-->
<!--eof-header logo and navigation display-->
<?php
if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
}
}
?>
</div>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>
<?php } ?>
!! HELP !!
Re: Broke website - need help quickly please!
Re: Broke website - need help quickly please!
Thank you for the reply...
I'm not experienced enough to know where there is an issue by looking at it. I read the information on the link you provided, I looked at the log files, there was an error with an un-needed ; on line 72. I removed it... no change in status.
Re: Broke website - need help quickly please!
Quote:
Originally Posted by
remo427
Thank you for the reply...
I'm not experienced enough to know where there is an issue by looking at it. I read the information on the link you provided, I looked at the log files, there was an error with an un-needed ; on line 72. I removed it... no change in status.
I take it you still have the template on your home computer?
Re-load the original tpl_header.php and start again
Re: Broke website - need help quickly please!
You could post the content of the most recent myDebug-xxxxxxx.log files here where we can help interpret their meaning for you.
Re: Broke website - need help quickly please!
To SchoolBoy - I copied the file in, no change.
To DrByte - Here is the log info:
EARLIER:
[21-Jun-2012 21:29:54] PHP Parse error: syntax error, unexpected '}' in /home/remo427/gff_http/mystore/includes/templates/avignon/common/tpl_header.php on line 48
MOST RECENT:
[21-Jun-2012 22:15:40] PHP Parse error: syntax error, unexpected ';' in /home/mystore/includes/templates/avignon/common/tpl_header.php on line 72
Site it still down hard...
Here is what I get when I view the source of the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
<title>Zen Cart!, The Art of E-commerce</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="Fruit Jelly Fruit Jam Spicy Jelly Syrup Beer and Wine Jelly Tisane 'Flower' Jelly Pie and Cobbler Jellies and Jams Chocolate Jellies and Jams ecommerce, open source, shop, online shopping " />
<meta name="description" content="Zen Cart! : - Fruit Jelly Fruit Jam Spicy Jelly Syrup Beer and Wine Jelly Tisane 'Flower' Jelly Pie and Cobbler Jellies and Jams Chocolate Jellies and Jams ecommerce, open source, shop, online shopping" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<base href="http://www.guyotfamilyfarms.com/mystore/" />
<link rel="canonical" href="http://www.guyotfamilyfarms.com/mystore/" />
<link rel="stylesheet" type="text/css" href="includes/templates/avignon/css/stylesheet.css" />
<link rel="stylesheet" type="text/css" media="print" href="includes/templates/avignon/css/print_stylesheet.css" />
</head>
<body id="indexHomeBody">
<div id="mainWrapper">
Earlier in the day, this had a lot more information.
Re: Broke website - need help quickly please!
on line 72 of your tpl_header.php file you have:
PHP Code:
<div class="headerTitle"><h1 class="shadow"><?php echo ; ?></h1><h1><?php echo ; ?></h1></div>
two empty echo's with a semi-colon after.. not sure what you were trying to do, but you either need to get rid of the empty echo(s), or put content after the echo (whatever you were trying to put in there)..
Re: Broke website - need help quickly please!
The first of those error messages suggest that you've deleted PHP code that contained braces, and now the braces are mismatched and thus the logic is broken.
jd8125 has responded on the other one.
I'd start by going back to the version of those files from before you started making changes.
Re: Broke website - need help quickly please!
I copied in an old file from a while back. That got the page to dispay again, but I have lost the Home and Login links in the header.
Here is the code from the page:
<!--bof-header logo and navigation display-->
<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
<ul class="back">
<li></a></li>
<li><a href="../../../../<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"></a></li>
<li><a href="../../../../<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"></a></li>
<li><a href="../../../../<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"></a></li>
<li><a href="../../../../<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"></a></li>
<li><a href="../../../../<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"></a></li>
</ul>
</div>
<div id="navMainSearch"></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->
<!--bof-branding display-->
<div id="logoWrapper">
<address style="float:right; text-align:right; margin: 105px 40px 1px 1px; font-weight:bold;"></address>
<div class="headerTitle"><h1 class="shadow"></h1><h1></h1></div>
<div id="taglineWrapper">
<div id="tagline"></div>
</div>
<br class="clearBoth" />
<!--bof-header ezpage links-->
<!--eof-header ezpage links-->
<!--eof-branding display-->
<!--eof-header logo and navigation display-->
<div id="bannerTwo" class="banners"></div>
</div>
</div>
Seems to be a lot missing, not sure what to put. Help.
Re: Broke website - need help quickly please!
as DrByte suggested, I would get a clean copy of the original file from a fresh set of files.. drop that file in, and things should look normal again. then you can attempt to make whatever modifications you were doing.