Thread: Template Issue

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Template Issue

    I recently upgraded my ZC version and plugins to the latest version. But I did not upgrade my theme yet, that is a long process that I just stated last night. I assume my issue has to do with not upgrading properly by doing a complete rebuild. I have to EAT CROW with this post :)

    I want to temporarily fix this current issue to buy me the time to properly rebuild the site which is going to take a bit of time. Everything shows fine except for one little area, which is the main category pages. Here is the website: http://www.throughtheagesfabric.com/ The problem only shows as a page hanging when I load any main category page. Every other page and function seems to be working except this. Even did a few test checkouts and everything else is fine. [HTML[/HTML]

    So... only the primary category pages hang like this one: http://www.throughtheagesfabric.com/fabric-c-21/ All other subcategories show fine. What I want to do is attempt to fix this issue so my primary category pages show.

    The error logs show this:

    Code:
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address:  HIDDEN #1  zen_categories_ul_generator->buildBranch() called at [/PATH/includes/classes/pzen_categories_ul_generator.php:97] #2  zen_categories_ul_generator->buildTree() called at [/PATH/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20] #3  require(/PATH/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/PATH/includes/templates/yourstore/common/tpl_header_v10.php:44] #4  require(/PATH/includes/templates/yourstore/common/tpl_header_v10.php) called at [/PATH/includes/templates/yourstore/common/tpl_main_page.php:153] #5  require(/PATH/includes/templates/yourstore/common/tpl_main_page.php) called at [/PATH/index.php:97]  [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /PATH/includes/classes/pzen_categories_ul_generator.php on line 59 [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address:  HIDDEN #1  zen_categories_ul_generator->buildBranch() called at [/PATH/includes/classes/pzen_categories_ul_generator.php:97] #2  zen_categories_ul_generator->buildTree() called at
    Would this be a specific file that shows the main category page header area? Just wondering where to look to attempt to identify this problem, but I am not sure which file might be the problem causing this hang.
    Building a better web, one site at a time: Dayton Web Design

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Template Issue

    You've chopped off the actual error message from the error log (besides removing the most-helpful carriage-returns). Would you post the error log details again?

  3. #3
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Template Issue

    Quote Originally Posted by lat9 View Post
    You've chopped off the actual error message from the error log (besides removing the most-helpful carriage-returns). Would you post the error log details again?
    OH... Here is one of the full error logs for 10/31/2017

    Code:
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 59
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 59
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 65
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 85
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 65
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 85
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 65
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 85
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 65
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 85
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 77
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator.php:97]
    #2  zen_categories_ul_generator->buildTree() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php:20]
    #3  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu_mobile.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:44]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator.php on line 77
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator_megamenu->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php:132]
    #2  zen_categories_ul_generator_megamenu->buildTree() called at [/MY ROOT/includes/functions/extra_functions/pzen_template.php:65]
    #3  pzen_megamenu() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php:169]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:64]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #6  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php on line 115
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator_megamenu->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php:132]
    #2  zen_categories_ul_generator_megamenu->buildTree() called at [/MY ROOT/includes/functions/extra_functions/pzen_template.php:65]
    #3  pzen_megamenu() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php:169]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:64]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #6  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php on line 115
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator_megamenu->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php:132]
    #2  zen_categories_ul_generator_megamenu->buildTree() called at [/MY ROOT/includes/functions/extra_functions/pzen_template.php:65]
    #3  pzen_megamenu() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php:169]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:64]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #6  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php on line 115
    [30-Oct-2017 06:13:04 America/Chicago] Request URI: /weaving-c-6_13/cricket-rigid-heddle-loom-15-p-24, IP address: 157.55.39.60
    #1  zen_categories_ul_generator_megamenu->buildBranch() called at [/MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php:132]
    #2  zen_categories_ul_generator_megamenu->buildTree() called at [/MY ROOT/includes/functions/extra_functions/pzen_template.php:65]
    #3  pzen_megamenu() called at [/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php:169]
    #4  require(/MY ROOT/includes/templates/yourstore/common/tpl_drop_menu.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php:64]
    #5  require(/MY ROOT/includes/templates/yourstore/common/tpl_header_v10.php) called at [/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php:153]
    #6  require(/MY ROOT/includes/templates/yourstore/common/tpl_main_page.php) called at [/MY ROOT/index.php:97]
    
    [30-Oct-2017 06:13:04 America/Chicago] PHP Warning:  A non-numeric value encountered in /MY ROOT/includes/classes/pzen_categories_ul_generator_megamenu.php on line 115
    Building a better web, one site at a time: Dayton Web Design

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Template Issue

    sportsguy,
    this strikes me as an error started when you moved from a php5.x to php7.x. php7 handles strings/integers differently than php5.x.

    in the function buildBranch, i had to make the following changes:

    PHP Code:
    //from
        
    $result sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="'. ($level+1) . '"' '' );

    //to
        
    $level = (int)$level 1;
        
    $result sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="'. (string)($level) . '"' '' ); 
    it looks like this could be your problem. although you class is probably slightly different from mine.

    i would start there. let us know how that goes!

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Template Issue

    Quote Originally Posted by carlwhat View Post
    sportsguy,
    this strikes me as an error started when you moved from a php5.x to php7.x. php7 handles strings/integers differently than php5.x.
    Yeah!! This temporarily fixed the problem. I did upgrade from PHP version 5.4 to 7.1 recently. For the time being, I lowered my PHP version from 7.1 to 7.0 and now the menu works properly. Let me start by saying, I do not know PHP very well, just enough to copy and paste. So in looking at the PHP coding in this file: /MY ROOT/includes/classes/pzen_categories_ul_generator.php I did find the coding you mentioned (around line #58 and #59) an modified it, but it did not help. I assume there are other locations than just the line I found and modified (line #58 in this file).

    I can live with PHP v7.0 and next time I rebuild, I think this issue is addressed in the new version of the template file. I would have never found this without your help. Much appreciated!
    Building a better web, one site at a time: Dayton Web Design

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Template Issue

    post the complete contents of the file and i can help point out/modify it for you...

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Template Issue

    Quote Originally Posted by carlwhat View Post
    post the complete contents of the file and i can help point out/modify it for you...

    best.
    That sounds great!! The file I am posting is: /MY ROOT/includes/classes/pzen_categories_ul_generator.php and here are the contents:

    Code:
    <?php
    //placeholder21// +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright(c) 2003 The zen-cart developers                           |
    // |                                                                      |
    // | http://www.zen-cart.com/index.php                                    |
    // |                                                                      |
    // | Portions Copyright(c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    // $Id: categories_ul_generator.php 2004-07-11  DrByteZen $
    //      based on site_map.php v1.0.1 by networkdad 2004-06-04
    //
    
    
    class zen_categories_ul_generator {
        var $root_category_id = 0,
        $max_level = 0,
        $data = array(),
        $parent_group_start_string = '<ul%s>',
        $parent_group_end_string = '</ul>',
        $child_start_string = '<li%s>',
        $child_end_string = '</li>',
        $spacer_string = '
    ',
        $spacer_multiplier = 1;
        
        var $document_types_list = ' (3) ';
        // acceptable format example: ' (3, 4, 9, 22, 18) '
        
        function zen_categories_ul_generator($load_from_database = true)
        {
            global $languages_id, $db;
            $this->data = array();
            $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
                                            from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                            where c.categories_id = cd.categories_id
                                            and c.categories_status=1 " .
                                            " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                                            " order by c.parent_id, c.sort_order, cd.categories_name";
            $categories = $db->Execute($categories_query);
            while (!$categories->EOF) {
                $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
                $categories->MoveNext();
            }
        }
        
        function buildBranch($parent_id, $level, $submenu=true, $parent_link='')
        {
            //resoponsive: dropdown-menu megamenu image-links-layout 
            $result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' role="menu" class="megamenu__submenu image-links-level-'. ($level+1).' level'. ($level+1) . '"' : '' );
            
            if (($this->data[$parent_id])) {
                foreach($this->data[$parent_id] as $category_id => $category) {
                    $category_link = $parent_link . $category_id;
                    if (($this->data[$category_id])) {
                        $result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu level'. ($level+1).'"' : ' class="level'. ($level+1).'"');
                        $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * 1) . '<a class="wdmn" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link, 'SSL') . '">';
                        $result .= $category['name'];
                        $result .= '</a>';
                        $result .='<span class="name mobmn"><span class="expander">-</span>';                
                        $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * 1) . '<a class="dropdown-toggle1" data-toggle="dropdown1" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link, 'SSL') . '">';
                        $result .= $category['name'];
                        $result .= '</a>';
                        $result .= '</span>';
                        
                                            
                    } else {
                        $result .= sprintf($this->child_start_string, ' class="level'. ($level+1).'"');
                        $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * 1) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link, 'SSL') . '">';
                        $result .= $category['name'];
                        $result .= '</a>';
                    }
                   
                      
                    if (($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) {
                        $result .= $this->buildBranch($category_id, $level+1, $submenu, $category_link . '_');
                    }
                    $result .= $this->child_end_string;
                }
            }
            
            $result .= $this->parent_group_end_string;
            return $result;
        }
        
        function buildTree($submenu=false)
        {
            return $this->buildBranch($this->root_category_id, '', $submenu);
        }
    }
    ?>
    Building a better web, one site at a time: Dayton Web Design

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Template Issue

    okay, i would just add 1 line and see if it works. the new line is in red. ensure that you put it exactly where i have it listed:

    Code:
        function buildBranch($parent_id, $level, $submenu = true, $parent_link = '')
        {
            //resoponsive: dropdown-menu megamenu image-links-layout
           $level = (int)$level;
    in addition, i believe you should change the following line (~41) as well. although please do the changes separate and test each one.

    PHP Code:
    //from:
    function zen_categories_ul_generator($load_from_database true)

    //to:
    function __construct($load_from_database true
    let us know how it goes!

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #9
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: Template Issue

    I attempted both of your suggestions one at a a time and then both together while switching to PHP to v7.1 and in each case the the primary page hung again. I noticed a post in the theme forum where a user had error notices to mine and I believe they fixed this issue in the newer template. This might be a multiple page issue.
    Building a better web, one site at a time: Dayton Web Design

  10. #10
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Template Issue

    Quote Originally Posted by sports guy View Post
    I attempted both of your suggestions one at a a time and then both together while switching to PHP to v7.1 and in each case the the primary page hung again. I noticed a post in the theme forum where a user had error notices to mine and I believe they fixed this issue in the newer template. This might be a multiple page issue.
    leave them both in... after doing that, do you have any debug logs?

    the second fix is a new construct for php7.X and is really unrelated to the problem. the first fix where we cast $level to integer is the one that should address the problem. but lets look at some log files if you have them!

    and it is no doubt a template issue, as this class came with the template and is not part of the ZC base.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 template issue
    By 100asa in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Dec 2013, 05:27 PM
  2. v150 Custom Template Issue
    By bcolby99 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Sep 2012, 03:04 AM
  3. CSS Validator issue - Peek-a-boo? Template Monster template
    By Mickmo68 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 May 2008, 02:51 AM
  4. template issue
    By oxymoronz in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 13 Aug 2007, 08:23 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