Skip to:
Content
Pages
Categories
Search
Top
Bottom

[resolved] Receive Fatal error on Profile after update to BP 1.6

  • @mr_zog

    Member

    I receive the following error on a profile for a logged in user after update:

    `Fatal error: Cannot access empty property in /home/commons/public_html/wp-content/plugins/buddypress/bp-core/bp-core-template.php on line 787`

    this is the few lines from that file

    `// Since the current component is based on the visible URL slug let’s
    // check the component being passed and see if its root_slug matches
    } elseif ( isset( $bp->{$component}->root_slug ) && $bp->{$component}->root_slug == $bp->current_component ) {
    $is_current_component = true;
    `

Viewing 7 replies - 1 through 7 (of 7 total)
  • @karmatosed

    Moderator

    Hi David, just to check can you provide a bit more information about your site? For instance what theme are you using and / or plugins? Have you checked they are all updated for BuddyPress 1.6? Or are you using a custom theme and have you updated that (if that is the case) for 1.6?

    @r-a-y

    Keymaster

    Can you make sure that your BuddyPress pages are setup properly?

    Login to the WP admin dashboard and navigate to “Settings > BuddyPress“. Then, click on “Pages“:
    https://codex.buddypress.org/getting-started/configure-buddypress-components/#bp-pages

    @mr_zog

    Member

    I am using my own child theme based on the core theme. I just tried switching to the default buddypress theme and did not receive the error. I should have tried that.
    Is there a specific reference for 1.6 theme changes? Or should I dig through the template files looking for the changes?

    I am running a large number of plugins and I have a handful of functions that I wrote for modifying the tabs on a user’s profile. I do not receive any errors if viewing another users profile, but only if “editing” or viewing the current users. I have a feeling it is one of my functions that is causing this failure.

    @mr_zog

    Member

    @r-a-y , I have verified my pages setup – all are associated with “pages”

    @r-a-y

    Keymaster

    @mr_zog – There hasn’t been any significant changes to the bp-default theme since 1.5.7. What version of BP 1.5 were you using before?

    Looks like you have narrowed this down to a child theme issue. Unfortunately, it’s hard to debug what’s happening. Are you using the “bp_is_current_component()” function in anyway? Did you disable the Extended Profiles component?

    Try to pinpoint what pages this error shows up on and then figure out which custom template file is causing the problem.

    @mr_zog

    Member

    I have discovered the problem. I use the Invite Anyone plugin – https://wordpress.org/extend/plugins/invite-anyone/ but have a custom function that removes the “Send Invites” tab from the user community. It is a closed community and I only wanted the functionality within groups.

    I use a function that contains $bp->bp_nav= false; to remove it. As soon as I removed that, it worked. I have tried using bp_core_remove_subnav_item( $bp->member->slug, ‘invite-anyone’ ); but that does not work.

    Thanks for the assistance. I should have done some 101 testing first but appreciate the quick look.

    @mr_zog

    Member

    AND I solved my own problem by typing it out here.

    YES – bp_core_remove_nav_item( ‘invite-anyone’ );

    My other solution was not working because it is not a subnav. As soon as I typed that I realized it.

    Thanks again for help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[resolved] Receive Fatal error on Profile after update to BP 1.6’ is closed to new replies.
Skip to toolbar