• After defining a new post type, i get this error on every admin page. deleting/reinstalling the plugin does not resolve the problem.

    Fatal error: Call to a member function add_cap() on a non-object in ..\wp-content\plugins\more-types\more-types-object.php on line 121

    Thanks

Viewing 15 replies - 1 through 15 (of 24 total)
  • I’m having this issue too.
    In fact this error only shows up if up change something in the ‘Advanced Settings’ page while creating/editng a new type, specifically if you assign some capabilities to the listed roles.

    Plugin Author henrikmelin

    (@henrikmelin)

    Thanks for the bug report – I’ll be fixing this in the next version. We’re in the process of ironing stuff like this out, preparing for 1.0 which’ll be out this week!

    Thanks for the fast response. I’ll wait patiently ??

    BTW, big thanks for the awesome “More…” suite!

    Hello,

    Still having this error:

    Fatal error: Call to a member function add_cap() on a non-object in /%SERVERPATH%/wp-content/plugins/more-types/more-types-object.php on line 135

    Is this the same error? I just downloaded this and set it up yesterday. It works fine until I log out of admin, at which point all is broken…

    Please let me know asap if you are going to be able to fix this soon, or if the community can help resolve this for us all,

    Thanks,

    Hey,

    I just comment out the line and it seems to work. What kind of capability do this line add (to what?!)?

    Posts with this “more type” Type are not displayed in the frontend. Also with that error line enabled.

    TheB

    Hello

    If roles aren’t important for you, you just have to comment line 135 in more-types-object.php file ??

    my apologies, commenting out works!

    Roles are important to me but I am willing to sacrifice them in this instance to get the plugin working. However, commenting it out is not working, did you try logging out and logging back in? It only seems to happen on the login screen.

    even when I delete the whole line, the error still shows up and says its on that line. so strange.

    Hello:

    I’m working with WordPress 3.1 and the more-tipes plugin throws the following error:

    Fatal error: Call to a member function add_cap() on a non-object in /%SERVERPATH%/wp-content/plugins/more-types/more-types-object.php on line 135

    I need the complete functionality of the plugin, so I would like how to fix it or if it will be fixed in a short period of time.

    Thank you very much.

    You’ll have better luck asking on the More Plugins support forums: https://labs.dagensskiva.com/forum/

    This function would only be useful if you were setting roles i think.

    Find line 135.

    Chang: $wp_roles->add_cap($role, $capability);

    To:

    if(is_object($mp_roles) && method_exists($wp_roles,'add_cap'))
    {
    	$wp_roles->add_cap($role, $capability);
    }

    @phxvyper Thanks so much, that fixed my issue. It was strange, it was only breaking in IE. Glad it’s fixed now!

    pete-sch

    (@pete-sch)

    Bug is still present in the latest version.

    Plugin version 2.0.3
    WordPress version 3.0.1

    Reproduction: Install and activate the plugin, set up some types and LOG OUT.

    $wp_roles global variable is available only for the logged-on user.

    I’m having this same problem

    Find line 135.

    Chang: $wp_roles->add_cap($role, $capability);

    To:
    if(is_object($mp_roles) && method_exists($wp_roles,’add_cap’))
    {
    $wp_roles->add_cap($role, $capability);
    }

    That totally worked. Thanks phxvyper!

    works for me too
    thx

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Plugin: More Types] Fatal error: Call to a member function add_cap()’ is closed to new replies.