Bug in menus controller

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
11 years 4 months ago #7085

Business 1.4.4. When trying to associate menu to module we obtain fatal error. Trace error to line 22 to /administrator/components/com_hikashop/controllers/menus.php

$menu = hikahop::get('class.menu');

There is not a menu class but menus class. Changing the above line to

$menu = hikashop::get('class.menus');

resolves the problem

Last edit: 11 years 4 months ago by jameswadsworth. Reason: typo

Please Log in or Create an account to join the conversation.

  • Posts: 75835
  • Thank you received: 11830
  • MODERATOR
11 years 4 months ago #7086

Thank you for your feedback. Indeed there should be an s.

It's hikashop and not dashop (in case others want to do the change).

We will release a new version in the beginning of next week with that fixed.

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
11 years 4 months ago #7146

Business 1.4.4

Unfortunately the problems have not stopped there. When we save the menu and we associate with a module we receive the following message:

Warning: Missing argument 2 for hikashopMenusClass::createAssocModule(), called in administrator/components/com_hikashop/controllers/menus.php on line 22 and defined in administrator/components/com_hikashop/classes/menus.php on line 249

In fact in the menus controller line 22 only the $id variable is passed to the function createAssocModule, instead of the $params and $id. This means that in the function createAssocModule(&$params,$id) line 249 &$params is being set as the $id value passed from the controller and $id is missing.

When the module is saved no params are saved in the database and when you try clicking on the menu link in the front end you get 500 message because it can not find the params to correctly build the database call.

Please Log in or Create an account to join the conversation.

  • Posts: 75835
  • Thank you received: 11830
  • MODERATOR
11 years 4 months ago #7152

Indeed you should replace the code in that controller :
$menu->createAssocModule($id);
by:
$menu->attachAssocModule($id);

We changed the modules/menus system quite a bit for the 1.4.4 and most of users create their menus from the joomla menu manager where there isn't this problem.

Please Log in or Create an account to join the conversation.

  • Posts: 272
  • Thank you received: 3
  • Hikashop Business
11 years 4 months ago #7162

Okay all working now thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum