Bug in menus controller
- jameswadsworth
-
Topic Author
- Offline
Less
More
15 years 7 months ago - 15 years 7 months ago #7085
by jameswadsworth
Bug in menus controller was created by jameswadsworth
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
$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: 15 years 7 months ago by jameswadsworth. Reason: typo
Please Log in or Create an account to join the conversation.
15 years 7 months ago #7086
by nicolas
Replied by nicolas on topic Re: Bug in menus controller
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.
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.
- jameswadsworth
-
Topic Author
- Offline
15 years 7 months ago #7146
by jameswadsworth
Replied by jameswadsworth on topic Re: Bug in menus controller
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.
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.
15 years 7 months ago #7152
by nicolas
Replied by nicolas on topic Re: Bug in menus controller
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.
$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.
- jameswadsworth
-
Topic Author
- Offline
15 years 7 months ago #7162
by jameswadsworth
Replied by jameswadsworth on topic Re: Bug in menus controller
Okay all working now thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds