The MU forums have moved to WordPress.org

Plugin commander not doing its job :( (24 posts)

  1. VentureMaker
    Member
    Posted 16 years ago #

    Well, here's what I have to say here...
    I love plugin commander, very handy and helpful thing. But...
    It doesn't work with some plugins as expected

    For example, WP e-Commerce (http://www.instinct.co.nz/e-commerce/)
    When I activate it via Plugins menu in WPMU - it works just great. When I activate it via plugin commander - it does not create default option in the database and WP e-Commerce doesn't work.

    NextGEN gallery (http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/) - plugin commander causes problems in WPMU during signup if NextGEN gallery is set to auto-activation.

    Great Real Estate plugin (http://www.rogertheriault.com/agents/plugins/great-real-estate-plugin/) - if activated via plugin commander won't allow to change settings.

    So, if you experience troubles with plugins not working - check if they work without plugin commander.

    BTW, dropped a message to author of plugin commander. Not sure what he did wrong, but it really messes things up :(

  2. boonika
    Member
    Posted 16 years ago #

    Maybe those plugins are not 100% MU compatible.

  3. andrea_r
    Moderator
    Posted 16 years ago #

    There are quite a few plugins, in the way they are coded, that just do not like being auto-activated.

  4. enriqueg
    Member
    Posted 16 years ago #

    Hi to all.

    My name is Enrique.

    I´ve seen you have some problems with the combination "PLUGIN COMMANDER" and "NEXTGEN GALLERY".

    I spent some hours "debugging" the code and i found a fast solution.

    The problem of that compatibility on the NEXTGEN case, is that the plugin checks "current_user_can('activ...plugins')... that cannot be evaluated correctly when let´s say the blog is in a "batch" process. (Creation from registration, or Admin creation).

    So: Wanna solve it? MAKE THIS ON YOUR OWN RISK.

    Instructions: MODIFY just 2 LINES FROM FILE: ngginstall.php of the nextgen plugins folder.

    Just add this //, to the lines 2 lines below "//Check for capability" (Lines 9 and 10) of the last version of that plugin.

    ----------------------------------------------------
    IT MUST LOOK LIKE THIS ;)

    function nggallery_install () {

    global $wpdb , $wp_roles, $wp_version;

    // Check for capability
    // if ( !current_user_can('activate_plugins') )
    // return;

    --------------------------
    Pls: Reply me with your feedback.
    Worked? Want to thank me a lot?? haha. paypal me to: admin@headhunterfinder.com some cents ;)

    Cheers,
    Enrique

  5. enriqueg
    Member
    Posted 16 years ago #

    *********************************************************
    COMPLETE SOLUTION - Sorry, one step missing.
    ********************************************************
    Please, don´t think i can fail you!!!

    I ommited one step. Now the solution is tested in every possible way and i am writing the complete solution here)

    First of all i am using:
    * WPMU 2.6.1,
    * NEXT-GEN Gallery 0.99.1
    * PLUGIN COMMANDER 1.1.5

    TESTED CASES:
    *without Plugin commander, with Plugin commander, auto-activation, mass act, mass deact, real new user/new blog plug-in auto-activation, admin user existentnew blog plug-in auto-activation, existing user new blog plug-in auto-activation. Almost every test case had different technical aspects to consider of the env. of both plugins relation.

    ERGO - i think there are no more possibilities.

    AGAIN: MAKE THIS MODs UNDER YOUR OWN RISK.

    FIRST STEP:
    -----------

    FILE: ngginstall.php of the nextgen plugins folder.
    ADD "//" BEFORE. (line 9, and 10) (Check it with my code)
    --------------------------------
    function nggallery_install () {

    global $wpdb , $wp_roles, $wp_version;

    // Check for capability
    // if ( !current_user_can('activate_plugins') )
    // return;

    SECOND STEP:
    ------------

    FILE: nggallery.php(Line 213 aprox) in the nextgen plugins folder.
    LOOK FOR THIS:
    // init tables in wp-database if plugin is activated
    function ngg_install() {
    // Check for tables
    AND ADD:
    include_once (dirname (__FILE__)."/ngginstall.php");
    AFTER // Check for tables.

    SO THE FINAL RESULT IS:

    // init tables in wp-database if plugin is activated
    function ngg_install() {
    // Check for tables
    include_once (dirname (__FILE__)."/ngginstall.php");
    nggallery_install();
    }

    ----------------------------------------------------
    That´s all.

    Pls: Reply with your feedback.

    Cheers,
    Enrique

  6. enriqueg
    Member
    Posted 16 years ago #

    I am new to the forum, sorry: i centered the solution in a new thread:
    http://mu.wordpress.org/forums/topic.php?id=9953

  7. VentureMaker
    Member
    Posted 16 years ago #

    I have contacted omry (the author of plugin commander). Here's his explanation:

    --- --- ---

    I am not doing anything special, and plugins that are written
    'correctly' should work fine.

    what do I mean by 'correctly'?

    there are two ways for a plugin to initialize itself:

    1. call some code straight inside the global scope.

    2. register to the activate plugin event, and initialize itself there.

    the first option have been deprecated in favor of the second one when WP
    2.0 came out (IIRC).
    so it's been around for a very long time now, and all plugins should use
    it instead of calling code (other than registering hooks) in the global
    scope.

    Plugin Commander supports only plugins that work using option 2.

    in FireStats, I register the hook like this:

    $plugin_name = substr(__FILE__, strlen(ABSPATH . PLUGINDIR . '/'));
    add_action("activate_$plugin_name",'fs_activate');

    the hook name depends on the plugin file name and this bit of code
    should work for every plugin (at least - it works for me regardless of
    the directory where I put FireStats).

    obviously you will have to replace fs_activate with the name of a new
    function, and to move the current plugin initialization code into that
    function.

    everything except add_action and add_filters calls should go into that
    function.

    add_action("activate_$plugin_name",'fs_activate'); should obviously not
    be in the function, but the rest can probably moved into it.

    You are most welcomed to send patches to the authors of the plugins you fix.

    the changes may be easy or difficult, depending on the plugin you are
    trying to fix.

    I looked at WP e-Commerce, and it looks it's plugin file
    (wp-shopping-cart.php) is pretty messy and may be a bit hard to fix
    without understanding it properly.

    this is because it functions and actual code is mixed over 90K of text.

    you might want to contact it's developers about this or if you feel
    comfortable enough with PHP fix it the way I described.

    good luck.

  8. enriqueg
    Member
    Posted 16 years ago #

    Just for the record: Both plugins are excellently written.
    The problem here, is that (not getting technical) Nextgen takes information from the environment that is not available, when wordpress installs a blog for example.

    Just adding 1 line and commenting 2 lines, makes the plugin work perfectly.

  9. VentureMaker
    Member
    Posted 16 years ago #

    Enrique, have you looked at WP e-Commerce?

  10. enriqueg
    Member
    Posted 16 years ago #

    Nop, i installed it, but as i saw it´s a "pay per full use" plug-in i am looking forward another shop solution. Does it present the same problem?

  11. VentureMaker
    Member
    Posted 16 years ago #

    Well, yes, WP e-Commerce does not populate the DB with default settings if activated via plugin commander. But I think I've got an alternative to plugin commander :)

  12. keeperbay
    Member
    Posted 16 years ago #

    It's stupid question time. Where can I download the commander plugin? I have gone through all 229 plugins twice tonight and I don't see it. And a search tells me that it can't be found.

    Did I miss out :(

  13. Ovidiu
    Member
    Posted 16 years ago #

  14. VentureMaker
    Member
    Posted 16 years ago #

  15. keeperbay
    Member
    Posted 16 years ago #

    Ovidiu, THANK YOU!
    I tell you, you people are wonderful. I have used many, many programs/scripts where I needed to ask questions. Many people were snotty, forgetting that they once where just learning how to use a script and/or programming.
    But here it seems no matter how many times a question is asked, it is answered with a professional manner and extra helpful information is always given. (Not just a link, but "it's the 3rd result". I had been searching plugins: http://wordpress.org/extend/plugins/tags/plugin)
    I wish all of you were part of OsCMax when I was learning programming, those days were tough!

    Thank you all for your help, your wonderful plugins, templates and warm personalities.

  16. Ovidiu
    Member
    Posted 16 years ago #

    :-) thx for the heads up.
    I was starting to lose all hope seeing the same questions all over.
    At least you saw how easy it was to find it and even said thank you :-)

    happy "playing" with plugin commander, its a great plugin.

  17. andrea_r
    Moderator
    Posted 16 years ago #

    "I had been searching plugins: http://wordpress.org/extend/plugins/tags/plugin)"

    That search kinda sucks, honestly. :-/ I use the tags there instead. BUT having said that. most plugins for WPMU are not listed int eh regualr plugin repository.

    You've found Plugin Commander, but you might want to peruse http://wpmudevorg.wordpress.com

    Thanks for the kind words, the volunteers here respond better with them. I'm sure a few people will disagree, but I figure some of us are only nasty when n00bs show up looking for a free ride (and rudely to boot).

    Here, have some cookies. :)

  18. hotohori8899
    Member
    Posted 15 years ago #

    "Well, yes, WP e-Commerce does not populate the DB with default settings if activated via plugin commander. But I think I've got an alternative to plugin commander :)"

    Hi VentureMaker, can share what is the alternative that you had? I too have the same problem.

    Thank you.

  19. VentureMaker
    Member
    Posted 15 years ago #

    Hey,

    Plugin Commander 1.1.5 (latest) does all the job pretty well.

  20. Markus Steiner
    Member
    Posted 15 years ago #

    This topic: http://mu.wordpress.org/forums/topic.php?id=6631
    is really helpful - by the way it helped me with this plugin commander problem.

  21. andrea_r
    Moderator
    Posted 15 years ago #

    In 2.7.1 you now have the ability to activate plugins sitewide.

  22. Ovidiu
    Member
    Posted 15 years ago #

    @andrea:

    how would one transition to the new built-in plugin management functionality? Just delete plugin commander? what about the options that plugin commander has, allowing to restrict plugin access, i.e. if I don't allow users to use a certain plugin, they can't activate it only me as a site_admin can do so.

    oh, and where would I find a detailed changelog or at least a list of new features for 2.7.1?

  23. donncha
    Key Master
    Posted 15 years ago #

    Ovidiu - http://ocaoimh.ie/2009/04/21/wordpress-mu-271/ http://trac.mu.wordpress.org/timeline

    The plugin code in there won't allow you to restrict access to plugins. If you enable the plugins page, then everyone gets it.

  24. Ovidiu
    Member
    Posted 15 years ago #

    doncha thx for the link to the changelog, will go study whats new and improved.

    regarding the plugin feature improvement: basically its a step forward but still not able to replace plugin commander.
    are there any plans on further improving the plugin handling and maybe offering all the features of plugin commander?

About this Topic

  • Started 16 years ago by VentureMaker
  • Latest reply from Ovidiu