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.

 

Unpublish Plugins

Unpublish Plugins

Hello,

I created a rule that should unpublish a particular plugin.  For some reason my plugin does not get unpublished.  I checked if my plugin is published after the Chameleon plugin and it is.  Any ideas what the issue can be?

Thank you,

Sima

Sima
SIMA
Junior Modder
ranks
useravatar
Offline
21 Posts
User info in posts
Administrator has disabled public posting

Re: Unpublish Plugins

Hi Sima,

When i added that feature I did a lot of testing with different scenarios and it seemed to be robust, but there's always a chance of other plugins or conditions making it fail.

Can I ask what the plugin is? Is it possible for me to get a hold of a copy to test it?

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

Re: Unpublish Plugins

Yes sure, the plugin is "System - Oniscore" which is installed together with the onisMusic component (onisMusic website)  I have sent yo the package via email.

Sima
SIMA
Junior Modder
ranks
useravatar
Offline
21 Posts
User info in posts
Administrator has disabled public posting

Re: Unpublish Plugins

ok, got that and have deleted post. Will check this later today.

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

Re: Unpublish Plugins

Hi - I wonder if you can tell me:

1 - what this plugin is supposed to do? I see that it's unpublished by default. Does it need to be switched on for all the component etc to work?
2 - what's the particular issue that it's causing, that means you need to selectively turn it off on some pages?

When Chameleon "turns off" plugins, what it's actually doing is to remove them from the list of "observers" in the plugin system. This effectively switches them off, but only as regards their functionality as plugins e.g. responding to messages like onAfterDispatch(). If the plugin file does other things as the plugin file is loaded, then these things will still happen. e.g. I see that a whole bunch of PHP files are loaded in when the main plugin php file is loaded, and Chameleon can't stop that happening.

I wonder if it's a plugin that does not need to be published because it's just there to hold the PHP libraries used by the rest of the onis system, and these get called regardless of its published status. If this is the case then Chameleon can't stop that happening, sorry! But I'm just guessing that unless you indicate otherwise...

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

Re: Unpublish Plugins

All I know is that it adds some stylesheets that are only required on the pages onisMusic is used.  I was hoping that via chameleon I could disable the plugin on all other pages.  I guess that is not possible.  Any idea if another extension exists that could accomplish this?

Sima
SIMA
Junior Modder
ranks
useravatar
Offline
21 Posts
User info in posts
Administrator has disabled public posting

Re: Unpublish Plugins

That makes me wonder what it is exactly that's calling the onisMusic plugin. Perhaps it's one of the modules or another plugin? I see that it asks you to enable one or some of the modules for handling AJAX functionality. So one route to explore would be to ensure that those modules are only assigned to pages where there is onisMusic functionality required.

If that doesn't lead anywhere, then there's another great way that Chameleon can help you. With Chameleon you can do a find-and-replace on the HTML code that appears on the finished page. So, you could identify the exact HTML code for the rogue stylesheet, then do a find-and-replace in the Succeed action (replace it with nothing). Of course, in the detection side of the rule you would need to identify all pages on which you know that the stylesheet is not necessary.

One way to do that would be if the stylesheet is only necessary on com_onismusic pages, then detect component com_omismusic, then in the FAIL action do the find and replace. That means if the user is NOT on an onisMusic page, then the stylesheet would be removed.

I help that helps,
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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Unpublish Plugins

Find and replace HTML on Fail will definitely work.  I always ignore the Fail action.  I guess, I am too busy succeeding that I forget how important failing can be  smile   Thanks!

Sima
SIMA
Junior Modder
ranks
useravatar
Offline
21 Posts
User info in posts
Administrator has disabled public posting

Re: Unpublish Plugins

No probs, just glad that this will work for you.

Best regards,
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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5940
Total Posts Today:
1
User Info:
 
Total Users:
5186
Newest User:
Totosite
Members Online:
0
Guests Online:
128

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