WordPress.org

Forums

[Plugin: Unfiltered MU] Fatal error with unfiltered-MU plugin on WPMU 2.8.2 (10 posts)

  1. Joss Winn
    Member
    Posted 6 years ago #

    Since 2.8.2, I'm getting this error if activated per blog or using the new site-wide activation option:

    PHP Fatal error: Call to a member function add_cap() on a non-object in /var/www/vhosts/blogs/wp-content/plugins/unfiltered-mu/unfiltered-mu.php on line 36, referer: http://blogs.example.com/wp-admin/update.php?action=install-plugin&plugin=unfiltered-mu&_wpnonce=cf898a7b82

    When installed in /mu-plugins/, it works fine.

  2. monpelaud
    Member
    Posted 6 years ago #

  3. Joss Winn
    Member
    Posted 6 years ago #

    Thanks. I used your first suggestion and it seems to be fixed. I'll file a bug in trac if there isn't one already.

  4. monpelaud
    Member
    Posted 6 years ago #

    I've edit "Site Admin/Options" and only "Update Options".
    All works fine with no modification in "wpmu-functions.php" until I "Log Out". If I log out and log in again the issue is always active.
    If I disable wpmuldap plugin all works fine.
    Do you use wpmuldap plugin ?

  5. Joss Winn
    Member
    Posted 6 years ago #

    I do use the ldap plugin on one site but I've had this problem on two other installs which don't use ldap.

  6. monpelaud
    Member
    Posted 6 years ago #

    With phpMyAdmin can you verify the value of "wp_1_capability" in the table "wp-usermeta" for "user_id = 1".
    Is it really set to "a:1:{s:13:"administrator";b:1;}" ?

  7. Donncha O Caoimh
    Member
    Posted 6 years ago #

    That Administrator fix is a bogus fix as the Administrator role doesn't exist.

  8. jasonzeng
    Member
    Posted 6 years ago #

    you can change the Line36 of unfiltered-mu.php:

    change

    $wp_roles->role_objects['editor']->add_cap( 'unfiltered_html' );

    to

    $wp_roles->add_cap('editor', 'unfiltered_html' );
  9. Farms - WPMU DEV
    WPMU DEV CEO
    Posted 5 years ago #

    FYI, you can download a fixed up version here: http://wpmu.org/unfiltered-mu-fixed-up-for-wpmu-2-8-4a/

  10. Donncha O Caoimh
    Member
    Posted 5 years ago #

    The promote_if_siteadmin() function has been fixed in the latest versions of WordPress MU. There's no need to modify the plugin.

    I don't recommend using the "fixed" version linked above, see here for further details.

Topic Closed

This topic has been closed to new replies.

About this Topic