Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Critical: Update to 2.1.8, released 15 Jan.

Fatal error: Call to a member function CheckPermission() on a non-object i

sarowlwpsarowlwp New
edited May 2012 in Vanilla 2.0 Help
This discussion is related to the MyProfile addon.

any help

2.0.18.4

@x00

Best Answer

Answers

  • well the only check permission is

    Gdn::Session()->CheckPermission('Garden.Users.Edit')

    so I would start by disabling plugin one by one.

    grep is your friend.

  • x00 said:
    well the only check permission is

    Gdn::Session()->CheckPermission('Garden.Users.Edit')

    so I would start by disabling plugin one by one.

    how can i fix that ?

  • x00x00 MVP
    Answer ✓

    I can't reproduce your error. Please disable other plugins to see if it is something else.

    grep is your friend.

    UnderDog
  • x00 said:
    I can't reproduce your error. Please disable other plugins to see if it is something else.

    i can`t find the error couse , so i uninstall it

  • I'm having the same issue. It's a new install of Vanilla I set up specifically to test a few plugins. MyProfile is the only plugin enabled, so it can't be any other plugin causing it.

    I'm using the admin profile, which is the only user on the forum. Here's the full error I get when I click the "About admin" link:

    ( ! ) Fatal error: Call to a member function CheckPermission() on a non-object in C:\wamp\www\community\forum\plugins\MyProfile\views\view.php on line 22
    Call Stack

    Time Memory Function Location

    1 0.0004 271520 {main}( ) ..\index.php:0
    2 0.1268 6724336 Gdn_Dispatcher->Dispatch( ) ..\index.php:53
    3 0.1432 8258856 Gdn_PluginManager->CallNewMethod( ) ..\class.dispatcher.php:313
    4 0.1432 8259712 MyProfile->ProfileController_MyProfile_Create( ) ..\class.pluginmanager.php:713
    5 0.2734 8823448 ProfileController->Render( ) ..\default.php:79
    6 0.2734 8823624 Gdn_Pluggable->__call( ) ..\default.php:79
    7 0.2742 8836056 Gdn_Controller->xRender( ) ..\class.pluggable.php:193
    8 0.2742 8837360 Gdn_Controller->FetchView( ) ..\class.controller.php:1073
    9 0.2746 8859504 include( 'C:\wamp\www\community\forum\themes\guns-grunge\views\profile\index.php' ) ..\class.controller.php:659
    10 0.2765 8905424 include( 'C:\wamp\www\community\forum\plugins\MyProfile\views\view.php' ) ..\index.php:6

    Any ideas? This plugin looks really useful, I'd really like to be able to use it.

    Thanks!

  • I notice the error

    $Session->CheckPermission('Garden.Registration.Manage')

    instead of

    $this->CheckPermission('Garden.Registration.Manage')

    good catch, thanks for the info it helps.

    grep is your friend.

  • sorry I meant Gdn::Session()->CheckPermission('Garden.Registration.Manage')

    grep is your friend.

  • That fixed it! Thanks for the quick response!

Sign In or Register to comment.