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.

 

display one or another menu item (ip based)

display one or another menu item (ip based)

Hi,
Since I've updated to Joomla 3.4 my rule doesn't work anymore.
I have only one : 4 countries (GeoliteCity and Country database are up-to-date)
The rule is : When the visitors are from one of these 4 countries a menu item is shown (SUCCEED) and when they are not from this country it shows another menu item. (FAIL)
Is that a logic rule ? It was working but now the two menu items are displayed.
Do I have to make two rules ?
Thanks for your reply !
Patrick

pouce
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: display one or another menu item (ip based)

Hi,

what version of Chameleon are you using? I uploaded a new version to the web site yesterday (2.46) which has some fixes for Joomla 3.4. Can you please try that version and see if it makes any difference?

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
3314 Posts
User info in posts
Administrator has disabled public posting

Re: display one or another menu item (ip based)

I have updated chameleon yesterday to 2.46 but that didn't solve the issue so I had to unpublish both menu items for the moment.
It may conflict with another plugin, it's a quite heavy sites regarding the extensions that are installed.
I was recently hosting it on siteground and couldn't leave it there cause I had a gateway time-out so I came back on my dedicated server.
I will investigate by disabling some plugin that may interfere with chameleon and will come back to you.
Best regards,
p.s. : tell me if you need the url of my website, thanks

pouce
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: display one or another menu item (ip based)

Hi, I have just tried this out on a stock Joomla 3.4.0 installation, and the menu disabling function works fine.

Could I suggest that you check the following?

1 - is that Chameleon rule definitely being executed? You can test this by turning on Chameleon's debug mode (in the Options panel from the Rule Chain or Config page). Then examine the output on the front page of your site and see what rules are being executed and what the results are. Perhaps you may see that the rule chain is being quit before it gets to that rule.

2 - do you have the system cache plugin turned on, or an alternative cache component? If you are switching things according to GeoIP address you either need a very clever cache (i.e. not the built-in one) or to have caching disabled.

3 - is it possible that your template is different from the one used in the previous version of Joomla, and the template is getting its menu items direct from the database instead of through the proper channels? If so, nothing Chameleon does to the Menu object is going to make any difference.

Hope those might set you in the right direction,
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
3314 Posts
User info in posts
Administrator has disabled public posting

Re: display one or another menu item (ip based)

Hi Stephen,
I turned on debug mode and get this :

Message

CHAMELEON DEBUG ON

Current date and time: "2015-03-23 00:08:47am" in timezone "Europe/Paris"

Processing rule id 4 ("Hikashop - Prices for European Customer")
- GeoIP: enabled
- GeoIP Country id: FR
- GeoIP Country name: France
- GeoIP: Country "FR" is not in the include list

Started FAIL action for rule id 4

- Removing menu item "413"
- Removing menu item "370"
- Removing menu item "371"
- Removing menu item "393"
- Removing menu item "414"
- Removing menu item "368"
- Removing menu item "369"
- Removing menu item "391"
- Removing menu item "410"
- Removing menu item "372"
- Removing menu item "373"
- Removing menu item "389"
- Removing menu item "416"
- Removing menu item "374"
- Removing menu item "375"
- Removing menu item "395"

Finished FAIL action: default template style not changed

Finished all rules

Final template style unchanged


Point 2
No the cache is disabled

Point 3
I don't understand your question, I use a template from Yootheme called 'capture' I checked my database and can't find any menu parameters in my database.
I have a field called cccc_templates_styles where there are all the templates installed but can't find any config about menu item
I only use one template for my website

pouce
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: display one or another menu item (ip based)

Hi Patrick,

Point 1: ok, Chameleon is obviously operating and thinks it is disabling the menu items.

Point 2: good

Point 3: I was wondering if the template that you used in previous versions of Joomla is the same template you are using now? Have you installed any upgrades to it?

The thing is, some templates used the standard JMenu object in Joomla, which is good as it allows Chameleon to alter the contents of that menu before it gets displayed. Some templates on the other hand make a direct database query to get the menu items to display, and this does not allow Chameleon to alter that list of items before the template displays it. So that's why it matters.
Could you please send me a copy of your template? I'll send you my e-mail address.

Thanks,
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
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5912
Total Posts Today:
4
User Info:
 
Total Users:
11509
Newest User:
michael2154
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