Jump to content
thirty bees forum

Recommended Posts

Posted

When I install the Panda theme on a TB 1.3 installation I get the following warning: Following non-theme related hooks were ignored. I never before saw such a thing. How should I understand this? Does this affect the working of the theme?

panda2.thumb.jpg.4ec209be2f0a3a9604e2337b6362a642.jpg

Posted (edited)

It looks like not having the hooks isn't a recipe for succes. This is how my homepage looks after the installation:

panda3.jpg.8839928ac88b7ddfdd276b231e490564.jpg

Edited by musicmaster
Posted

These warnings exists to inform user that the theme tries to hook / unhook nondisplayable hook. 

Take hook actionFeatureSave from module blocklayered as an example. This module use this hook to react on a situation when feature is saved to database in order to rebuild its cache. Why should installation of a new theme disable or enable this functionality, which has absolutely nothing to do with theme?

The reason why your theme looks 'weird' after installation is that it did not provide valid set of displayable hooks that should be hooked/unhooked via its xml file. Thirty bees did not know what to do, and therefore did nothing.

Posted (edited)

@musicmaster I recently installed Panda on a 1.3 installation and didn't encounter any issues. Same installation is now running 1.4 bleeding edge and so far no issues.

I suggest you try again and if it still doesn't work reach out to the ST themes forums for support as you should have support available after you purchased the theme. Also please post the solution here for anyone else that may encounter the same problem. 

PS: from what I remember there was a patch folder for TB in the installation zip. Think you should copy it and try it. 

Edited by Theo
Posted
11 hours ago, datakick said:

These warnings exists to inform user that the theme tries to hook / unhook nondisplayable hook. 

Take hook actionFeatureSave from module blocklayered as an example. This module use this hook to react on a situation when feature is saved to database in order to rebuild its cache. Why should installation of a new theme disable or enable this functionality, which has absolutely nothing to do with theme?

The reason why your theme looks 'weird' after installation is that it did not provide valid set of displayable hooks that should be hooked/unhooked via its xml file. Thirty bees did not know what to do, and therefore did nothing.

Yes. I am afraid that it is something like that. I checked my migrated shop and I saw that it has 63 modules with Prestashop as author and only 2 modules with Thirty Bees as author. I haven't checked yet but I am afraid the situation is similar with hooks. 

That would mean that many of the hooks that Panda assumes essential in Thirty Bees just aren't present. But that would imply that the migration module is not doing what it is supposed to do.

Posted
6 hours ago, musicmaster said:

But that would imply that the migration module is not doing what it is supposed to do.

That's not how hook works, there is nothing to migrate.

Hooks records are created on the fly, either explicitly (definition in theme, programatically from module) or implicitly when module register hook handler using $this->registerHook('whatever'). PHP code can call any hook (even if it does not exists) by executing Hook::exec('hookname',...). The same applies to templates, where you can call hook by {h name='hookname'} syntax. If hook record does not exists, or exists but no module installs handler, this call is a noop.

Posted

Not knowing the exact details of what you are trying to do here makes this a bit difficult. 

But maybe try a fresh TB install, patch Panda then install Panda first before you do the migration...?

Posted
18 hours ago, datakick said:

The reason why your theme looks 'weird' after installation is that it did not provide valid set of displayable hooks that should be hooked/unhooked via its xml file. Thirty bees did not know what to do, and therefore did nothing.

This is the latest version of the Panda theme - the only third party theme for Thirty Bees that is still supported. That should work. It evades me why you claim that it shouldn't.

Posted
6 minutes ago, Theo said:

Not knowing the exact details of what you are trying to do here makes this a bit difficult. 

But maybe try a fresh TB install, patch Panda then install Panda first before you do the migration...?

I am trying to install Panda on a migrated shop that worked ok under Prestashop.

Posted
4 minutes ago, musicmaster said:

This is the latest version of the Panda theme - the only third party theme for Thirty Bees that is still supported. That should work. It evades me why you claim that it shouldn't.

First of all, it does work, otherwise you would not be able to provide the screenshot 🙂

I haven't seen the theme config.xml file, so it's hard to tell what is wrong. In this config file, theme author can specify which modules should be enabled and installed. For these enabled modules, author should specify what (displayable) hooks should be registered == the hooks that are called by theme. These hooks will be enabled, all other displayable hooks not mentioned in the xml file will be disabled. If the xml file does not mention any displayable hooks for given module, no hooks of the module will be enabled or disabled.

Thirty bees is doing only operations that are requested by config.xml file. 

You can always go to Modules, and reset various theme related modules to restore the module default hook list (not the list one specified by theme), or go to Positions and transplant one hook position to another. However, this operation should not be needed if the config.xml file is properly defined. 

Posted (edited)

When I use the module compare function of Prestools to compare the hooks I see this for the Stmegamenu module. I compared the shop I am working on with a shop I migrated a long time ago to TB. They use quite different hooks (all hooks that are not on the other side are highlighted). For many other modules there is a similar picture. Specially the Header/displayheader and displayMainMenu/displayMainmenu differences puzzle me.

hooks.thumb.jpg.9a0666a8d39fab448d966c79aa443121.jpg

Edited by musicmaster
Posted
1 hour ago, musicmaster said:

I am trying to install Panda on a migrated shop that worked ok under Prestashop.

Remember to patch Panda before you install it and try a fresh install of TB first. If it's possible to do the migration after. 

Posted
44 minutes ago, musicmaster said:

Specially the Header/displayheader difference puzzles me.

Header is an alias for displayHeader, it exists for backwards compatibility reasons.

Posted

If you look into Config.xml file for what it says about stmegamenu module:

      <hook module="stmegamenu" hook="Header" position="35"/>
      <hook module="stmegamenu" hook="actionCategoryAdd" position="3"/>
      <hook module="stmegamenu" hook="actionCategoryDelete" position="3"/>
      <hook module="stmegamenu" hook="actionCategoryUpdate" position="5"/>
      <hook module="stmegamenu" hook="actionObjectCategoryDeleteAfter" position="2"/>
      <hook module="stmegamenu" hook="actionObjectCategoryUpdateAfter" position="2"/>
      <hook module="stmegamenu" hook="actionObjectCmsDeleteAfter" position="3"/>
      <hook module="stmegamenu" hook="actionObjectCmsUpdateAfter" position="3"/>
      <hook module="stmegamenu" hook="actionObjectManufacturerDeleteAfter" position="3"/>
      <hook module="stmegamenu" hook="actionObjectProductUpdateAfter" position="3"/>
      <hook module="stmegamenu" hook="actionObjectSupplierDeleteAfter" position="3"/>
      <hook module="stmegamenu" hook="actionProductAdd" position="5"/>
      <hook module="stmegamenu" hook="actionProductDelete" position="5"/>
      <hook module="stmegamenu" hook="actionProductUpdate" position="5"/>
      <hook module="stmegamenu" hook="actionShopDataDuplication" position="5"/>
      <hook module="stmegamenu" hook="displayLeftColumn" position="15"/>
      <hook module="stmegamenu" hook="displayMainMenu" position="1"/>
      <hook module="stmegamenu" hook="displaySideBarRight" position="2"/>
      <hook module="stmegamenu" hook="hookActionObjectProductDeleteAfter" position="1"/>

When we ignore non-displayable hooks that should (and are not) changed by theme installation, we have

      <hook module="stmegamenu" hook="Header" position="35"/>
      <hook module="stmegamenu" hook="displayLeftColumn" position="15"/>
      <hook module="stmegamenu" hook="displayMainMenu" position="1"/>
      <hook module="stmegamenu" hook="displaySideBarRight" position="2"/>

proper name for 'Header' hook is 'displayHeader', so the alias functionality works. Also, hook names are case insensitive, so 'displayMainMenu' and 'displayMainmenu' are the same.

Now compare this with your image that "doesn't work" -- the same set of displayable hooks were set up for this particular module. 

Thirty bees is doing exactly what theme config.xml file instructed it to do. It installed (or enabled) stmegamenu module, unhooked all its displayable hooks, and hooked those specified in xml file.

If the result is not right, well,... it's the problem of theme config file.

Posted

From what I recall the Panda patch could've fixed something with the config file and hooks. It was a while back when dk made some changes to the way the themes read that xml or something then Sunny had to patch Panda. The installation folder contains the patch. Unzip the installation and copy the patch into it, then use this new folder for the theme install. 

Let us know if you came right please. I'm curious to see what the problem was and how it was fixed and if the patch helped. 

Also if it works on a fresh TB with patched Panda, then you know it's likely something to do with the old site migrate and not the theme. 

Posted (edited)
4 hours ago, Theo said:

From what I recall the Panda patch could've fixed something with the config file and hooks. It was a while back when dk made some changes to the way the themes read that xml or something then Sunny had to patch Panda. The installation folder contains the patch. Unzip the installation and copy the patch into it, then use this new folder for the theme install. 

Let us know if you came right please. I'm curious to see what the problem was and how it was fixed and if the patch helped. 

Also if it works on a fresh TB with patched Panda, then you know it's likely something to do with the old site migrate and not the theme. 

What is this patch? Is it a file? With what name?

I am busy with other things so I won't be able to react for some time

Edited by musicmaster
Posted (edited)

Panda is compatible with 1.6 version only up to V1.4.5 For PS1.6 and V1.5.3 For TB.

that is the V1 of Panda.

Now the "up to date" version is V2 now 2.7.0 and it's only gonna work with presta 1.7, it has been a long time that sunny dropped ps 1.6 and TB support.

Edited by zen
  • Like 1
Posted (edited)

It's a folder within the Panda zip. I think it's called 1.15 or something. Will probably check tomorrow. But you'll recognise it immediately when you see it. Got a bunch of folders in it. 

Edited by Theo
Posted

Ok found it. The folder name is update1.5.5

Unzip the installation, then copy the contents of the update folder into the Panda installation folder, then install Panda.

  • 3 weeks later...
Posted

@Theo I found that the main file is already 1.5.5. The update directory is only for updating existing installations.

I found that the error message was misleading:

panda_installation2.jpg.b44f4cb8576a1334e40ffeef74fb07fd.jpg

The problem is that this CategoryController override was not the only override that was "not installed properly". Panda tries to install 8 overrides. But after this initial failure it just stopped. It didn't even try to install the other seven - even though in many cases there was no conflicting override.

Posted

The reason why the page was almost empty was the lack of hooks. Most themes do that straight away. For example displayNav in header.tpl

<nav>{hook h="displayNav"}</nav>

or

{hook h='displayNav'}

In Panda the relevant section looks like this:

{if (isset($HOOK_NAV_LEFT) && $HOOK_NAV_LEFT|trim) || (isset($HOOK_NAV_RIGHT) && $HOOK_NAV_RIGHT|trim)}
<div id="top_bar" class="nav {Configuration::get('STSN_HEADER_TOPBAR_SEP_TYPE')|default:'vertical-s'} {if !$sttheme.sticky_topbar} hide_when_sticky {/if}" >
  <div class="wide_container">
    <div class="container">
      <div id="top_bar_row" class="flex_container">
        <nav id="nav_left" class="flex_float_left">{$HOOK_NAV_LEFT}</nav>
        <nav id="nav_right" class="flex_float_right">{$HOOK_NAV_RIGHT}</nav>
      </div>
    </div>					
  </div>
</div>
{/if}

By default neither $HOOK_NAV_LEFT nor $HOOK_NAV_RIGHT is defined. So there will be no displayNav hook and thus the content linked to that hook is not displayed. 

The override FrontController.php contains the following text that inserts the hook:

$this->context->smarty->assign(array(
	'HOOK_NAV_LEFT' => Hook::exec('displayNavLeft'),
	'HOOK_NAV_RIGHT' => Hook::exec('displayNav'),
));

For some other hooks the same thing applies.

As my FrontController override hadn't been installed my page stayed empty.

Posted (edited)

Overriding core files for theme use is not something that is for everyone.

As with every update of the shop you need to watch if overriden core files have changed, and to look what those changes bring, to not override them again with outdated override file.

Edited by toplakd
  • 1 month later...
Posted
On 8/3/2022 at 3:09 AM, zen said:

Panda is compatible with 1.6 version only up to V1.4.5 For PS1.6 and V1.5.3 For TB.

that is the V1 of Panda.

Now the "up to date" version is V2 now 2.7.0 and it's only gonna work with presta 1.7, it has been a long time that sunny dropped ps 1.6 and TB support.

@zenare you saying Panda V1 is compatible with current tb version?

Posted
9 hours ago, Mark said:

@zenare you saying Panda V1 is compatible with current tb version?

Yes, Sunny has a TB version of Panda V1 that is TB compatible. You can download it with his standard v1 license.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...