Wrong module loaded

Wrong module loaded was created by d4rkbl4de

Posted 8 years 10 months ago #28002
URL : luselandcu.now-hosting.com/index.php

The mega menu loads the wrong module for some reason. It's set to load module ID 98, 100 and 101 under Personal, ID 99, 102 and 103 under Business and ID 104, 105 and 106 under Agriculture but it loads ID 104, 105 and 106 under all three parents.

I don't understand, I've set the right IDs and in the menu modules, they have different settings.

I noticed when unpublishing the agriculture part, now Personal and Business will load modules ID 104, 105 and 106 of Business.

I am very confused. What would I be doing wrong?

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

Replied by ced1870 on topic Wrong module loaded

Posted 8 years 10 months ago #28004
Hi
do you have a cache enabled or something like this on your website ? this is strange as this has never happened before
if you don't find, please give me an admin access per email to check this
CEd

Joomlack Webmaster and Developer

by ced1870

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

Replied by d4rkbl4de on topic Wrong module loaded

Posted 8 years 10 months ago #28006
I just sent you an email through Contact Us because my cache is off!

Thank you for your quick reply!


Edit: I've realized that if I change the modules titles to be unique, it fixes the problem. It's odd because the title shouldn't affect which one is loaded, it should go by unique ID. I'll leave my menus as is so you can check it out! I changed the names for all the Quick Links menus so you can also see how it fixes the problem!
Last Edit:8 years 10 months ago by d4rkbl4de
Last edit: 8 years 10 months ago by d4rkbl4de.
The following user(s) said Thank You: ced1870

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

Replied by ced1870 on topic Wrong module loaded

Posted 8 years 10 months ago #28019
I was just looking at your website :)

It's odd because the title shouldn't affect which one is loaded,

right, this is the reason and yes this is odd

the reason explained, is that the JModuleHelper class search for a module from 2 variables :
- type (mod_menu)
- name (title of the module)

I don't understand this really as for me the real way to load a module is to call it by its unique ID. Now I'm using the JModuleHelper class because this is the Joomla! API

Conclusion :
Rename your modules :)

CEd

Joomlack Webmaster and Developer

by ced1870

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

Time to create page: 0.680 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1205 guests and one member online