Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default EZ Page title shows but content doesn't

    Hi, I am trying to add ez pages to my site. When created and I click the link all I get is the page title and even the page footer is missing.. Please see attached images. Also at https://tradefiresafety.co.uk/index....=23&chapter=10 Thanks in advance to the Zen Cart Community

    Click image for larger version. 

Name:	1.jpg 
Views:	75 
Size:	60.4 KB 
ID:	18018

    Click image for larger version. 

Name:	2.jpg 
Views:	43 
Size:	18.6 KB 
ID:	18019

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: EZ Page title shows but content doesn't

    It would appear that you've got a partial whitepage, implying that there's a debug-log present in the store's /logs directory that identifies the source of the error.

  3. #3
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    Quote Originally Posted by lat9 View Post
    It would appear that you've got a partial whitepage, implying that there's a debug-log present in the store's /logs directory that identifies the source of the error.
    does the following point to a resolve?

    [04-Sep-2018 20:46:11 Europe/London] PHP Fatal error: Call to a member function RecordCount() on null in /home/tradefiresafety/public_html/includes/templates/theme154/templates/tpl_page_default.php on line 31

    here is line 30 through 35

    // create a table of contents for chapter when more than 1 page in the TOC
    if ($pages_listing->RecordCount() > 1 and EZPAGES_SHOW_TABLE_CONTENTS == '1') {?>
    <div id="navEZPagesTOCWrapper">
    <h2 id="ezPagesTOCHeading"><?php echo TEXT_EZ_PAGES_TABLE_CONTEXT; ?></h2>
    <div id="navEZPagesTOC">
    <ul>

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: EZ Page title shows but content doesn't

    That log's indicating that the $pages_listing variable isn't set. What version of Zen Cart are you running?

    Note that for Zen Cart 1.5.5, that $pages_listing->RecordCount() element reads sizeof($toc_links) > 1 for the default template version.
    Last edited by lat9; 4 Sep 2018 at 09:33 PM.

  5. #5
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    version 1.5.5 f

    I do not know code so the rest is double dutch to me. Can you help me fix it?

  6. #6
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: EZ Page title shows but content doesn't

    Quote Originally Posted by Congerman View Post
    does the following point to a resolve?

    [04-Sep-2018 20:46:11 Europe/London] PHP Fatal error: Call to a member function RecordCount() on null in /home/tradefiresafety/public_html/includes/templates/theme154/templates/tpl_page_default.php on line 31

    here is line 30 through 35

    // create a table of contents for chapter when more than 1 page in the TOC
    if ($pages_listing->RecordCount() > 1 and EZPAGES_SHOW_TABLE_CONTENTS == '1') {?>
    <div id="navEZPagesTOCWrapper">
    <h2 id="ezPagesTOCHeading"><?php echo TEXT_EZ_PAGES_TABLE_CONTEXT; ?></h2>
    <div id="navEZPagesTOC">
    <ul>
    Seems to indicate that the template file being used is from pre-Zen Cart 1.5.3 and that changes have possibly been made such as an upgrade to a newer version but not everything about the template has been updated to reflect the new way of coding.

    Suggest comparing your template file against the template_default or responsive_classic version as applicable for your version of Zen Cart.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    below is the content of my template. I do not want to screw anything up. Can you see any issue with it?

    <?php
    /**
    * Page Template
    *
    * This is the template used for EZ-Pages content display. It is named "tpl_page_default" instead of ezpage for friendlier appearance
    *
    * @package templateSystem
    * @copyright Copyright 2003-2012 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 GIT: $Id: Author: DrByte Sat Oct 6 16:09:44 2012 -0400 Modified in v1.5.2 $
    */
    ?>
    <div class="centerColumn" id="ezPageDefault">
    <h1 id="ezPagesHeading"><?php echo $var_pageDetails->fields['pages_title']; ?></h1>

    <?php if (EZPAGES_SHOW_PREV_NEXT_BUTTONS=='2' and $counter > 1) { ?>
    <div id="navEZPageNextPrev">
    <a href="<?php echo $prev_link; ?>"><?php echo $previous_button; ?></a>
    <?php echo zen_back_link() . $home_button; ?></a>
    <a href="<?php echo $next_link; ?>"><?php echo $next_item_button; ?></a>
    </div>
    <?php } elseif (EZPAGES_SHOW_PREV_NEXT_BUTTONS=='1') { ?>
    <div id="navEZPageNextPrev"><?php echo zen_back_link() . $home_button . '</a>'; ?></div>
    <?php } ?>

    <?php

    // vertical TOC listing
    // create a table of contents for chapter when more than 1 page in the TOC
    if ($pages_listing->RecordCount() > 1 and EZPAGES_SHOW_TABLE_CONTENTS == '1') {?>
    <div id="navEZPagesTOCWrapper">
    <h2 id="ezPagesTOCHeading"><?php echo TEXT_EZ_PAGES_TABLE_CONTEXT; ?></h2>
    <div id="navEZPagesTOC">
    <ul>
    <?php while (!$pages_listing->EOF) {
    // could be used to change classes on current link and toc (table of contents) links
    if ($pages_listing->fields['pages_id'] == $_GET['id']) { ?>

    <li><?php echo CURRENT_PAGE_INDICATOR; ?><a href="<?php echo zen_ez_pages_link($pages_listing->fields['pages_id']);?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>

    <?php } else { ?>

    <li><?php echo NOT_CURRENT_PAGE_INDICATOR; ?><a href="<?php echo zen_ez_pages_link($pages_listing->fields['pages_id']); ?>"><?php echo $pages_listing->fields['pages_title']; ?></a></li>
    <?php
    }
    $pages_listing->MoveNext();
    } ?>
    </ul>
    </div>
    </div>
    <?php
    }
    ?>
    <div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>
    </div>

  8. #8
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    temporary fix was to rename the overriding template so as the master took over. But it would be nice to know what needed changing in the override one.

  9. #9
    Join Date
    Sep 2009
    Posts
    28
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    Great find. I finally came across your post after searching high and low.

    The solution is to make sure the template files for the version of Zencart you're using are the same. If you setup template files for a site years ago and upgraded the base install over time, the way the templates are coded has changed. They don't use the same functions in the same way on newer versions of the cart. The old templates were written one way, but the new style is different.
    Although the whole site isn't broken, the instances where things are different enough fail.

    I had an old template file from the original 1.3 or 1.4 ZC install. The installed version of ZC is 1.5.5f, which apparently is incompatible.
    In my case, I copied the template file from an untouched 1.5.5f .zip (tpl_page_default.php in my case) into the current install. The functions that were failing as shown in the myDEBUG file are now not being used, so no more errors. And the page displays as expected.

    Thanks mc12345678

  10. #10
    Join Date
    Jan 2011
    Location
    Ohio
    Posts
    111
    Plugin Contributions
    0

    Default Re: EZ Page title shows but content doesn't

    Quote Originally Posted by jonasrullo View Post
    Great find. I finally came across your post after searching high and low.

    The solution is to make sure the template files for the version of Zencart you're using are the same. If you setup template files for a site years ago and upgraded the base install over time, the way the templates are coded has changed. They don't use the same functions in the same way on newer versions of the cart. The old templates were written one way, but the new style is different.
    Although the whole site isn't broken, the instances where things are different enough fail.

    I had an old template file from the original 1.3 or 1.4 ZC install. The installed version of ZC is 1.5.5f, which apparently is incompatible.
    In my case, I copied the template file from an untouched 1.5.5f .zip (tpl_page_default.php in my case) into the current install. The functions that were failing as shown in the myDEBUG file are now not being used, so no more errors. And the page displays as expected.

    Thanks mc12345678
    Thanks so much!
    This thread just helped me a lot!

    I'm upgrading from 1.3.9h to 1.5.7c and (3) of my EZ-Pages only displayed the title!
    I used the tpl_page_default.php file from the "default template", and modified my 'old' tpl_page_default.php with the updated code!
    Worked GREAT!

    Thanks again....

 

 

Similar Threads

  1. Replies: 10
    Last Post: 2 Sep 2010, 12:26 PM
  2. why thumbnail shows normal in classic template, but it doesn't show in mine?
    By paulchui in forum Customization from the Admin
    Replies: 2
    Last Post: 15 Nov 2009, 03:34 PM
  3. why thumbnail shows normal in classic template, but it doesn't in mine
    By paulchui in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Nov 2009, 01:00 PM
  4. I'm stumped: sidebox content shows but headings don't
    By wbmangy in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Feb 2009, 11:41 PM
  5. IE shows gap but FF doesn't
    By Momokui in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Feb 2007, 10:53 PM

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