The MU forums have moved to WordPress.org

WPMU Plugin Commander and WPMU 2.6.5 issue (7 posts)

  1. PerS
    Member
    Posted 5 years ago #

    When I try to mass activate a plugin using plugin commander 1.1.5, it fails with "Can't load Plugin Commander".

    The url is /wp-admin/wpmu-admin.php?page=Plugin Commander&mass_activate=scissors/scissors.php

    Is this a known issue for wpmu 2.6.5 ?

  2. andrea_r
    Moderator
    Posted 5 years ago #

    I think it's more an issue with the plugin commander. Funnily enough, I think it actually still mass activates the plugin.

  3. PerS
    Member
    Posted 5 years ago #

    no it didn't mass activate the plugin

  4. Ovidiu
    Member
    Posted 5 years ago #

    though I use that combination, I can't comment as I haven't yet upgraded to 2.6.5

  5. PerS
    Member
    Posted 5 years ago #

    I believe I found the reason for this issue, but not a solution .. yet.

    The problem is related to using a different language than the default. My site is in Norwegian (nb_NO.mo), if I switch back to English, Plugin Commander works fine.

    the log reports:

    "GET /wp-admin/wpmu-admin.php?page=Plugin%20Commander&mass_activate=scissors/scissors.php HTTP/1.1" 500 487 "http://domain.com/wp-admin/wpmu-admin.php?page=Innstikk%20behandler" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4"

    Innstikk behandler is Norwegian for Plugin Commander

  6. cafespain
    Member
    Posted 5 years ago #

    Oh, it may be that something (WordPress or Plugin commander) is translating the menus. I haven't looked at any code so I would assume plugin commander ;p

  7. PerS
    Member
    Posted 5 years ago #

    Sure, and you're right. Plugin Commander hard codes it (on line 32):

    define('PC_CMD_BASE',PC_HOME."?page=Plugin%20Commander");

    Changing it and moving it into function pc_textdomain() fixes this bug:

    function pc_textdomain()
    {
    //		uncommet lines to work around wpmu 1.5.1 and 1.3.3 locale bug (http://trac.mu.wordpress.org/ticket/665)
      global $locale;
      $old = $locale;
      $locale = WPLANG;
      load_plugin_textdomain('plugin-commander', 'wp-content/mu-plugins/plugin-commander-i18n');
      $locale = $old;
      define('PC_CMD_BASE',PC_HOME."?page=" . __('Plugin Commander', 'plugin-commander'));
    }

    I moved it to pc_textdomain to make sure the translation is loaded prior to defining PC_CMD_BASE

    Not sure if I should do the same with define('PC_PLUGINS_CMD_BASE',PC_PLUGINS_HOME."?page=Plugins");

About this Topic