Skip to:
Content
Pages
Categories
Search
Top
Bottom

Error in buddypress code bp-menu bp-logout-nav


  • fasirathore
    Participant

    @fasirathore

    When I added “bp-menu bp-logout-nav” to my menu items in BuddyPress, clicking on any other BuddyPress menu item such as notifications, messages, or profiles would log me out of WordPress unexpectedly. After removing the “bp-menu bp-logout-nav” from the menu, I no longer experienced logging out when clicking on any menu component.
    “bp-menu bp-logout-nav” is affecting other menu items of buddypress. How can I resolve it, I also have reinstalled buddypress plugin after deleting it but problem is still present.

Viewing 23 replies - 1 through 23 (of 23 total)
  • Hi @fasirathore

    Thanks for your feedback, are you using BP version 12.0.0?
    Can you check your error log file to see if something was traced in it?
    What’s your WordPress set up ? Multisite or not ? If Multisite is BuddyPress activated on the network ?


    fasirathore
    Participant

    @fasirathore

    Thanks for reply,
    Yes its BP 12.0.0. My site forextradingcommunity.com is not a multisite.
    I could not find anything in debug log.


    fasirathore
    Participant

    @fasirathore

    I even have changed the theme as well but it also haven’t resolved it.

    Hi,

    I just tested and I wasn’t able to reproduce, sorry. I don’t think it’s a BuddyPress problem. Have you tried to temporarily deactivate all plugins except BuddyPress to see if the issue was still there?

    If so, maybe you can try to activate the BP Classic backwards compatibility plugin in case there’s a 3rd party BP plugin playing into this area.


    fasirathore
    Participant

    @fasirathore

    You are right, I have deactivated Elementor Plugins and it is no longer logging me out. BP classic was previously activated. I’m contacting elementor support for issue. Also if there are some steps that we need to take from Buddy press side, kindly advise
    Thank you so much Mathieu


    fasirathore
    Participant

    @fasirathore

    I contacted elementor’s support but they told me that its out of their scope of support.
    What could be the problem causing this, as if I remove elementor and elementor pro, my BP menus work fine.


    fasirathore
    Participant

    @fasirathore

    For context, its not just created menu that has this error but also the admin panel profile system from buddypress. Even though, if I click notifications or messages from admin panel profile tab at top right, it will log me out.


    fasirathore
    Participant

    @fasirathore

    [24-Dec-2023 13:05:23 UTC] PHP Warning: Attempt to read property “name” on bool in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-admin/nav-menus.php on line 1215
    this is from debug log


    fasirathore
    Participant

    @fasirathore

    wp_get_nav_menu_object( $menu_locations[ $location ] )->name
    this is the line 1215

    @fasirathore

    It was not logging you out with version 11.4.0 of BuddyPress?

    Can you rollback to 11.4.0 keeping BP Classic active to see if that solves the issue?

    Elementor’s reply is amazing, considering the price you pay for support & the fact we can’t test on our side because it’s a premium plugin and they can test on their side as BuddyPress is free. If it was out of their scope, Elementor wouldn’t conflict with BuddyPress…

    I believe you’re looking in the wrong direction: if clicking on Notifications or Messages from the top right admin panel is logging you out, it’s not a WP Nav Menu.

    Have you tried clicking on these links being in WP Admin?


    fasirathore
    Participant

    @fasirathore

    I’m also surprised from elementor.
    Mathieu thanks for your helping.
    I got another error in debug log
    [24-Dec-2023 13:42:33 UTC] PHP Deprecated: Function bp_core_get_user_domain is deprecated since version 12.0.0! Use bp_members_get_user_url() instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031


    fasirathore
    Participant

    @fasirathore

    * Fires when the given function triggers a user-level error/warning/notice/deprecation message.
    *
    * Can be used for debug backtracking.
    *
    * @since 6.4.0
    *
    * @param string $function_name The function that was called.
    * @param string $message A message explaining what has been done incorrectly.
    * @param int $error_level The designated error type for this error.
    */
    do_action( ‘wp_trigger_error_run’, $function_name, $message, $error_level );

    if ( ! empty( $function_name ) ) {
    $message = sprintf( ‘%s(): %s’, $function_name, $message );
    }

    $message = wp_kses(
    $message,
    array(
    ‘a’ => array( ‘href’ ),
    ‘br’,
    ‘code’,
    ’em’,
    ‘strong’,
    ),
    array( ‘http’, ‘https’ )
    );

    trigger_error( $message, $error_level );
    }

    The last line is line no 6031


    fasirathore
    Participant

    @fasirathore

    Yes, I have tried accessing Messages and Notifications from Wp-Admin, and it still logs me out. there is a new error message in debug log. I have added that in previous response.
    I’m sorry im not educated enough to understand it all, so I have difficulty explaining you as well.

    This last one is more helpful. Are you sure BP Classic is active? Because if active BuddyPress shouldn’t add this depreciation notice.

    What happens if you add this code to your wp-config.php?
    define( 'BP_IGNORE_DEPRECATED', true );


    fasirathore
    Participant

    @fasirathore

    I’m sorry, i just have deactivated bp classic compatibility plugin and the last error message was reason to that, by reactivating it the error disappeared from debug log.

    Is there any way that I can give you access to wordpress so you can see it?

    Ouch, it will probably generate a fatal, but maybe we’ll get more information to trace which plugin is using this deprecated function.

    I’m sorry, I’m too afraid to break things: I never do that.

    I wonder if it could be a malformed link


    fasirathore
    Participant

    @fasirathore

    I have better messages, bbpress and bbp style pack by robin w. These are plugins that have influence over buddypress


    fasirathore
    Participant

    @fasirathore

    Since we have started debuging on this case I have debug log.
    Let me reply all of that in next response, I won’t bother you much.
    If there can be a possible known issue, we can resolve by looking into error log it will be great. Alternatively I will recreate my site from start.
    Thanks


    fasirathore
    Participant

    @fasirathore

    /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/themes/hello-elementor/functions.php on line 229

    [23-Dec-2023 07:58:30 UTC] PHP Warning: Attempt to read property “title” on null in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/class-wp-customize-widgets.php on line 905

    [23-Dec-2023 07:59:01 UTC] PHP Deprecated: The PSR-0 Requests_... class names in the Requests library are deprecated. Switch to the PSR-4 WpOrg\Requests\... class names at your earliest convenience. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/class-requests.php on line 24

    [23-Dec-2023 08:08:45 UTC] Cron reschedule event error for hook: better_messages_cleaner_job, Error code: invalid_schedule, Error message: Event schedule does not exist., Data: {“schedule”:”better_messages_cleaner_job”,”args”:[],”interval”:300}

    [23-Dec-2023 08:11:04 UTC] PHP Deprecated: Function print_emoji_styles is deprecated since version 6.4.0! Use wp_enqueue_emoji_styles instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    [23-Dec-2023 08:32:43 UTC] PHP Warning: Attempt to read property “title” on null in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/class-wp-customize-widgets.php on line 905

    [23-Dec-2023 08:32:54 UTC] PHP Deprecated: File Theme without header.php is deprecated since version 3.0.0 with no alternative available. Please include a header.php template in your theme. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    [23-Dec-2023 08:42:41 UTC] PHP Deprecated: Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    [23-Dec-2023 08:43:00 UTC] PHP Deprecated: The PSR-0 Requests_... class names in the Requests library are deprecated. Switch to the PSR-4 WpOrg\Requests\... class names at your earliest convenience. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/class-requests.php on line 24

    [23-Dec-2023 08:44:10 UTC] PHP Deprecated: Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    [23-Dec-2023 11:32:30 UTC] PHP Deprecated: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/plugins/litespeed-cache/src/control.cls.php on line 547

    [23-Dec-2023 11:55:40 UTC] PHP Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/plugins/bbp-style-pack/includes/settings_import.php on line 16

    [23-Dec-2023 12:55:50 UTC] PHP Deprecated: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/plugins/litespeed-cache/src/control.cls.php on line 547

    [23-Dec-2023 14:04:20 UTC] PHP Warning: file_put_contents(): Exclusive locks may only be set for regular files in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/plugins/bbp-style-pack/includes/generate_css.php on line 165

    [23-Dec-2023 14:34:05 UTC] PHP Deprecated: Automatic conversion of false to array is deprecated in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-content/plugins/google-analytics-for-wordpress/includes/admin/notification-event-runner.php on line 94

    [24-Dec-2023 11:48:54 UTC] PHP Warning: Attempt to read property “name” on bool in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-admin/nav-menus.php on line 1215

    [24-Dec-2023 11:48:54 UTC] Cron reschedule event error for hook: action_scheduler_run_queue, Error code: invalid_schedule, Error message: Event schedule does not exist., Data: {“schedule”:”every_minute”,”args”:[“WP Cron”],”interval”:60}

    [24-Dec-2023 11:49:58 UTC] Cron reschedule event error for hook: better_messages_cleaner_job, Error code: invalid_schedule, Error message: Event schedule does not exist., Data: {“schedule”:”better_messages_cleaner_job”,”args”:[],”interval”:300}

    [24-Dec-2023 11:51:55 UTC] PHP Deprecated: Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    [24-Dec-2023 13:03:21 UTC] PHP Warning: mysqli_real_connect(): (HY000/1130): Host ‘127.0.0.1’ is not allowed to connect to this MariaDB server in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/class-wpdb.php on line 1987

    [24-Dec-2023 13:05:23 UTC] PHP Warning: Attempt to read property “name” on bool in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-admin/nav-menus.php on line 1215

    [24-Dec-2023 13:05:29 UTC] PHP Warning: Attempt to read property “name” on bool in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-admin/nav-menus.php on line 1215

    [24-Dec-2023 13:05:31 UTC] PHP Warning: Attempt to read property “name” on bool in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-admin/nav-menus.php on line 1215

    [24-Dec-2023 13:42:33 UTC] PHP Deprecated: Function bp_core_get_user_domain is deprecated since version 12.0.0! Use bp_members_get_user_url() instead. in /home/u604108565/domains/forextradingcommunity.com/public_html/wp-includes/functions.php on line 6031

    So 😅. Thanks for sharing the error log. To me, deprecation notices cannot be the source of your troubles. For bbPress you need BP Classic as it’s not ready for BP 12.0.0. I submitted a patch to their Trac env. but it has not been committed yet.

    Even if BP Classic is active, your links are logging you out?

    There’s only 2 way to get this behavior, the links are containing the logout URL, or some code is redirecting the page after logging you out.

    Next step would be to rollback to 11.4 to see if the bug has disappeared. But if it’s the case I’d be surprised.


    fasirathore
    Participant

    @fasirathore

    It was not resolved by installing previous version of BuddyPress, I have restored my site discarding recent changes that I made. Now it is working fine.

    Thanks for your time.

Viewing 23 replies - 1 through 23 (of 23 total)
  • You must be logged in to reply to this topic.
Skip to toolbar