Forums / Templates, Stylesheets, Page Layout / error in ezpages template - from TemplateMonster

error in ezpages template - from TemplateMonster

Views: 1,175

Results 1 to 3 of 3
14 Oct 2014, 7:38 PM
#1
chief avatar

chief

New Zenner

Join Date:
Oct 2008
Location:
Barry, UK
Posts:
24
Plugin Contributions:
0

error in ezpages template - from TemplateMonster

hi,
I purchased a theme from templatemoster.com #27530. and didnt notice zencart versions
I have started to customize the theme and its live @ https://www.tlsystems.co.uk with zencart 1.51
I have started testing with zencart 1.53 and have come across this error in /logs/

[14-Oct-2014 19:48:02 Europe/London] PHP Fatal error: Call to a member function RecordCount() on a non-object in /var/www/html/tlsystems/includes/templates/theme324/templates/tpl_page_default.php on line 34

This is from includes/templates/theme324/templates/tpl_page_default.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') {?>

dave

14 Oct 2014, 9:49 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: error in ezpages template - from TemplateMonster

chief:

hi,
I purchased a theme from templatemoster.com #27530. and didnt notice zencart versions
I have started to customize the theme and its live @ https://www.tlsystems.co.uk with zencart 1.51
I have started testing with zencart 1.53 and have come across this error in /logs/

[14-Oct-2014 19:48:02 Europe/London] PHP Fatal error: Call to a member function RecordCount() on a non-object in /var/www/html/tlsystems/includes/templates/theme324/templates/tpl_page_default.php on line 34

This is from includes/templates/theme324/templates/tpl_page_default.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') {?>

dave

Couple of things...

Templatemonster...

Also, one thing to do is to check the template files provided by them against the default template files of 1.5.3.

Specifically at that line I think if you add is_array($pages_listing) && before the recordcount check (or maybe it's isset($pages_listing) && ) if that is not set, then the second check will not be performed to cause the error.

Sorry, can't remember but there are examples of such a check throughout the code.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 3:05 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: error in ezpages template - from TemplateMonster

The v153 template file for ez-pages is NOT compatible with v151, or vice-versa.

The main difference is explained here: http://www.zen-cart.com/showthread.php?174916-ezpages-not-showing&p=1261593#post1261593
You will need to make the same change to your purchased template. Or ask TemplateMonster for a modern version of what they sold 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.