Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2012
    Posts
    7
    Plugin Contributions
    0

    red flag 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 !!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Broke website - need help quickly please!

    .

    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.

  3. #3
    Join Date
    Jun 2012
    Posts
    7
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Broke website - need help quickly please!

    Quote Originally Posted by remo427 View Post
    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
    20 years a Zencart User

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    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.

  6. #6
    Join Date
    Jun 2012
    Posts
    7
    Plugin Contributions
    0

    Default 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&trade; Team and others" />
    <meta name="generator" content="shopping cart program by Zen Cart&trade;, 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.
    Last edited by remo427; 22 Jun 2012 at 02:48 PM. Reason: additional info...

  7. #7
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default 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)..

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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.
    .

    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.

  9. #9
    Join Date
    Jun 2012
    Posts
    7
    Plugin Contributions
    0

    Default 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.

  10. #10
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. Replies: 14
    Last Post: 3 Oct 2011, 05:02 AM
  2. Website Crashed. Need Help Please
    By goldnuggetsales.com in forum General Questions
    Replies: 3
    Last Post: 1 Oct 2011, 07:02 PM
  3. Important - Need help quickly - secure/unsecure
    By beyre in forum General Questions
    Replies: 4
    Last Post: 12 Mar 2009, 04:06 AM
  4. Need help quickly please. Banner link
    By Tanzanite in forum Basic Configuration
    Replies: 0
    Last Post: 25 Feb 2007, 05:06 PM
  5. Need help quickly - Can't configure product listings!!!
    By brain21 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Oct 2006, 06:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR