Page 1 of 1

Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 10:54 am
by mhsuffolk
This is an addon that we received in the early days of supporters addon which works in my 1.0.7.0 live shop but 1.0.8.0 breaks it with,

Fatal error: Uncaught Error: Call to undefined method category_tree::setCategoryPath() in D:\Phoenix_1_0_8_0\htdocs\includes\modules\navbar\nb_navbar_categories.php:53 Stack trace: #0 D:\Phoenix_1_0_8_0\htdocs\includes\modules\content\navigation\cm_navbar.php(60): nb_navbar_categories->getOutput() #1 D:\Phoenix_1_0_8_0\htdocs\includes\system\versioned\1.0.7.9\osc_template.php(106): cm_navbar->execute() #2 D:\Phoenix_1_0_8_0\htdocs\templates\default\includes\components\template_top.php(46): oscTemplate->getContent('navigation') #3 D:\Phoenix_1_0_8_0\htdocs\templates\default\includes\pages\index.php(13): require('D:\\Phoenix_1_0_...') #4 D:\Phoenix_1_0_8_0\htdocs\index.php(17): require('D:\\Phoenix_1_0_...') #5 {main} thrown in D:\Phoenix_1_0_8_0\htdocs\includes\modules\navbar\nb_navbar_categories.php on line 53

Here is some of the code. Lines 49 to 67

Code: Select all

    function getOutput() {
      global $oscTemplate;
      
      $NB_CategoryTree = new category_tree();
      $NB_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>');
      $NB_CategoryTree->setMaximumLevel(1);
      $NB_CategoryTree->setParentGroupString('<ul class="dropdown-menu">', '</ul>', true);
      $NB_category_tree = $NB_CategoryTree->getTree();
      
      ob_start();
      require('includes/modules/navbar_modules/templates/tpl_' . basename(__FILE__));
      $data = ob_get_clean();

      $oscTemplate->addBlock($data, $this->group);
    }

    function isEnabled() {
      return $this->enabled;
    }

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 11:40 am
by Fiber
mhsuffolk wrote: Thu May 20, 2021 10:54 am This is an addon that we received in the early days of supporters addon which works in my 1.0.7.0 live shop but 1.0.8.0 breaks it
I dont believe that was a supportsaddon, but i can get it wrong...
Deinstall the navbar module and install this (link removed by Admin) tested with 1.0.8.0 and 1.0.8.3 and seems to work..

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 11:55 am
by ecartz

Code: Select all

      $NB_CategoryTree = new category_tree();
to

Code: Select all

      $NB_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree');
And I'm pretty sure that there is a Supporters code: S3/s03e09

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 12:02 pm
by mhsuffolk
Fiber wrote: Thu May 20, 2021 11:40 am
Deinstall the navbar module and install this (link removed by Admin), tested with 1.0.8.0 and 1.0.8.3 and seems to work..
Thank you for the heads up which works fine.

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 12:04 pm
by mhsuffolk
ecartz wrote: Thu May 20, 2021 11:55 am

Code: Select all

      $NB_CategoryTree = new category_tree();
to

Code: Select all

      $NB_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree');
And I'm pretty sure that there is a Supporters code: S3/s03e09
Thanks for your help, the alternative addon suggested by @Fiber works on 1.0.8.0

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 12:06 pm
by Fiber
ecartz wrote: Thu May 20, 2021 11:55 am And I'm pretty sure that there is a Supporters code: S3/s03e09
s03e09 - Hori Menu in my log and it was first S3d30 - Hori Menu
Checked again but no navbar cat addon

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 12:11 pm
by mhsuffolk
In the code is this

Code: Select all

$this->api_version = '28d 2018, v1.12 &copy; G Burton';

Re: Navbar Categories Supporters addon problem

Posted: Thu May 20, 2021 12:15 pm
by Fiber
mhsuffolk wrote: Thu May 20, 2021 12:11 pm In the code is this

Code: Select all

$this->api_version = '28d 2018, v1.12 &copy; G Burton';
Oh okay fixed that were the 28dg addons, so not in the addon with seasons supporters ... thought though i'm crazy now? :-)