[Skip to main content](#vessel-content)

#   Bug in menus controller

##

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 9 months ago -  15 years 9 months ago [\#7085](#7085) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  *[Bug in menus controller](/forum/3-bug-report/7085-bug-in-menus-controller#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&#95;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")* was created by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")*

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: 15 years 9 months ago by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile"). Reason: typo

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDg1LWJ1Zy1pbi1tZW51cy1jb250cm9sbGVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 9 months ago [\#7086](#7086) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Bug in menus controller](/forum/3-bug-report/7085-bug-in-menus-controller#7086 "Business 1.4.4. When trying to associate menu to module we obtain fatal error. Trace error to line 22 to /administrator/components/com&#95;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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDg1LWJ1Zy1pbi1tZW51cy1jb250cm9sbGVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 9 months ago [\#7146](#7146) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Re: Bug in menus controller](/forum/3-bug-report/7085-bug-in-menus-controller#7146 "Business 1.4.4. When trying to associate menu to module we obtain fatal error. Trace error to line 22 to /administrator/components/com&#95;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")*

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(&amp;$params,$id) line 249 &amp;$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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDg1LWJ1Zy1pbi1tZW51cy1jb250cm9sbGVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

15 years 9 months ago [\#7152](#7152) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Bug in menus controller](/forum/3-bug-report/7085-bug-in-menus-controller#7152 "Business 1.4.4. When trying to associate menu to module we obtain fatal error. Trace error to line 22 to /administrator/components/com&#95;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")*

Indeed you should replace the code in that controller :
$menu-&gt;createAssocModule($id);
by:
$menu-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDg1LWJ1Zy1pbi1tZW51cy1jb250cm9sbGVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 9 months ago [\#7162](#7162) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Re: Bug in menus controller](/forum/3-bug-report/7085-bug-in-menus-controller#7162 "Business 1.4.4. When trying to associate menu to module we obtain fatal error. Trace error to line 22 to /administrator/components/com&#95;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")*

Okay all working now thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83MDg1LWJ1Zy1pbi1tZW51cy1jb250cm9sbGVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.054 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
