Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal Error When Plugin activated


  • mackeykevin
    Participant

    @mackeykevin

    The plugin was working great until last night now when I have the plugin activated i get a fatal error message and the entire page will not load.. Please help. I have the plugin disabled now but i would like to get it back up asap

    thank you so much

Viewing 13 replies - 1 through 13 (of 13 total)

  • mackeykevin
    Participant

    @mackeykevin

    Forgot to include, that if i am logged in as the admin working on the site, it works fine, but if i am logged out and attempt to look at the site, that is when the fatal error message comes up


    mackeykevin
    Participant

    @mackeykevin

    Fatal error: Call to undefined function bp_get_activity_directory_permalink() in /home4/ab49180/public_html/DRSTEPHANIEDANIEL.COM/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 427


    r-a-y
    Keymaster

    @r-a-y

    Looks like it is a problem with your theme.

    Does this error occur if you switch your theme to the WP default theme, twentyfifteen?


    mackeykevin
    Participant

    @mackeykevin

    I will check, if i change themes and the problem goes away what are my fix options. I am currently running theme “X”. If i change themes with the pages be edited due to cornerstone?


    mrjarbenne
    Participant

    @mrjarbenne

    If you change themes you will lose all the customization that your theme provides through that Cornerstone custom page builder (I assume this is your theme http://themeforest.net/item/x-the-theme/full_screen_preview/5871901)

    I would suggest — because you have paid for the theme — that you go back to the theme developer and let them know that code in their theme is causing an error. The error message you provided shows exactly where the offending code is. It looks as though your theme has some additional customizations applicable to BuddyPress specifically.

    If the theme author won’t help, and you have FTP access to your site’s server, you could go in under public_html/DRSTEPHANIEDANIEL.COM/wp-content/themes/x/framework/functions/global/plugins/buddypress.php and see what is on line 427 of that buddpress.php file that might be screwing things up.


    mackeykevin
    Participant

    @mackeykevin

    @mrjarbenne:
    Thanks so much i forward my help to Theme X support, I thought it was a BuddyPress issue, that is why i came here. I do have access to my server and a FTP. What should line 427 say? I know silly question but it is a shot in the dark if it is supposed to be something specific

    again thanks so much, i am excited to get buddy press working again


    mackeykevin
    Participant

    @mackeykevin

    line 427:
    $top_level_link = ( is_user_logged_in() ) ? bp_loggedin_user_domain() : bp_get_activity_directory_permalink();
    $submenu_items = ”;


    mrjarbenne
    Participant

    @mrjarbenne

    It’s hard to know what that file is doing without seeing the whole thing. It’s not a standard BP file, it’s something your theme developer has added to provide additional functionality to the theme (something that would probably be better left as a plugin, but that’s another argument entirely). BuddyPress has its own theme compatibility layer, that should make it look nice in any theme. Your theme is clearly trying to do something fancy with BuddyPress in a way that is messing things up.

    A quick google search reveals a few different people having issues with the xTheme and BP.

    https://theme.co/community/forums/topic/buddypress-error/
    https://theme.co/community/forums/topic/buddypress-website-down/

    This topic seems to suggest that if the activity stream isn’t activated in Settings/BuddyPress/Activity Streams then there is an error:

    https://buddypress.org/support/topic/buddypress-website-dowm/

    You could try commenting out the line as suggested in the above link. You could comment out line 427. You could temporarily delete the entire buddypress.php file in your theme (use your FTP program to throw it on your desktop and then delete it).

    In the end, the X themes developer should really be the one to fix this.


    mackeykevin
    Participant

    @mackeykevin

    @MrJarbenne:

    You are the man !!!! I know it is not a fix because i do not like the activity page, but you were right on. I had my activity page disabled, i enabled it and voila it works.. sincerely thank you brother .


    mackeykevin
    Participant

    @mackeykevin

    Ok since you are my godsend I hate the activity page.. How do I edit the buddypress menu to remove the page from the menu? Matter of fact how do I change the order of the items in the menu? You are the man remember that always


    mrjarbenne
    Participant

    @mrjarbenne

    So, if you can comment out any references to the Activity Stream Permalink/URL in that buddpress.php file you should be able to deactivate the Activity Stream again.

    Look in that file for references to bp_get_activity_directory_permalink(); and then put a /* at the beginning of the code and */ where the line seems to end. One of those support forum links suggested line 478, but that might be an older version of the theme, and the offending line may indeed just be 427 and nothing else.

    Glad to help.


    mrjarbenne
    Participant

    @mrjarbenne

    Use, or create, the bp-custom.php file in your plugins folder: https://codex.buddypress.org/themes/bp-custom-php/

    Add this to it (make sure you add a <?php tag if you are creating a bp-custom file for the first time.

    function bbg_change_profile_tab_order() {
    global $bp;
    
    // Change Menu Order
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘friends’][‘position’] = 20;
    $bp->bp_nav[‘groups’][‘position’] = 30;
    $bp->bp_nav[‘blogs’][‘position’] = 40;
    $bp->bp_nav[‘messages’][‘position’] = 50;
    $bp->bp_nav[‘settings’][‘position’] = 60;
    
    // Remove a menu item
    $bp->bp_nav['activity'] = false;
    }
    add_action( ‘bp_setup_nav’, ‘bbg_change_profile_tab_order’, 999 );

    I haven’t tested this. I hijacked it from here: http://themekraft.com/customize-profile-and-group-menus-in-buddypress/


    mrjarbenne
    Participant

    @mrjarbenne

    Well, I just tested it and it didn’t work. Hopeful someone can come in and suggest an alternate fix. One of the issues is that the code I’ve pasted there was pulled from a source that switched to smart quotes rather than regular quotes, but that doesn’t seem to be the only issue as I’ve rectified that on my test and it didn’t help.

    Here’s the source:

    How to Add, Remove, and Change the Order Of BuddyPress Component Menu

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Fatal Error When Plugin activated’ is closed to new replies.
Skip to toolbar