Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Unpublished Menus Still Displaying with JotCache Installed

Unpublished Menus Still Displaying with JotCache Installed

I have a very simple rule that says, "if you are a member of X group then unpublish certain items from the main menu.  The rule seems to run fine (per the debug below), but the menus are still showing up.  They show up but when you click on them, nothing happens.  How do I keep them from even showing up?

I read on the forum that my problem might commonly be due to a cache issue so I have also installed JotCache.  I then configured JotCache to exclude the location of my main menu.  I also made sure that JotCache is the last in the plug-in list and that the Chameleon actions plugin is listed above my S5 Menu plugin.

I'm using Joomla 3.3, JotCache 5, the default system cache is disabled.  I am also using a Vertex template.  The Chameleon debug script shows:

CHAMELEON DEBUG ON
Current date and time: "2014-12-19 04:04:32am" in timezone "UTC"
Processing rule id 4 ("HideMainMenuCongregations")
- Groups: User is a member of a selected group - succeeding
Started SUCCEED action for rule id 4
- Removing menu item "268"
- Removing menu item "387"
- Removing menu item "320"
Finished SUCCEED action: default template style not changed
Finished all rules
Final template style unchanged

Any help would be greatly appreciated.

MinMatch
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Unpublished Menus Still Displaying with JotCache Installed

Hi MinMatch,

Can I just check a few things with you:

1 - if you don't have any of the caches turned on (i.e. JotCache off, and not using the normal system cache) do the menu items show up or not?

2 - if you don't have Chameleon disabling the menu items, does that change them from "showing up but nothing happens when you click on them" to "fully functioning"? i.e. it's important to isolate that you can stop the menu items from functioning by ONLY toggling Chameleon on and off.

3 - Can you explain what mechanism is being used to display your menu? Is it via a standard "mod_menu" menu module, or is it something build in to your template, or some mixture of the 2? I admit that sometimes it can be really difficult to work out how your template displays the menus!

I'm intrigued by the fact that according to what you wrote, Chameleon seems to simply disable the menu items rather than make them disappear altogether. Please do the tests above to ensure that really is the case.
Chameleon removes menu items by accessing an internal object structure of menu items and removing the menu items from it that you have selected. It doesn't mark them as "disabled" -- it completely removes them.
However, some templates or menu modules may not use this object structure to display the menu. They may instead query the database directly, and show a menu based on that. In that case, Chameleon can't stop those menu items from appearing.

I wonder if that's what is happening? Your menu display mechanism may be querying the database directly, and displaying the menu items. Then, because those items are "switched off" internally, when Joomla goes to display the requested page it can't find it and produces an error (is that what happens when you go to one of the "disabled" menu items?). Or there may be some other interaction between the menu display mechanism and the disabled menu items, so that it does display the item, but it maybe recalculates the URL based on the internal menu structure from which the items were removed, meaning they don't have a URL any more.

Anyway all of that is speculation at the moment. Hopefully your answers to the questions above may shed some more light on it.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4397
Newest User:
tull687318
Members Online:
0
Guests Online:
139

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked