Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Antipole replied to the topic Warning: Attempt to read property "id" on null [...]bp-xprofile-template.php in the forum How-to & Troubleshooting

Дата публикации: 21-04-2026 13:53:00



Основное содержимое страницы с новостью.

Warning: Attempt to read property “id” on null […]bp-xprofile-template.php
  • Hi… since updating to PHP8.3 I am seeing the warning
    Warning: Attempt to read property "id" on null in /home/[...]/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 558

    Any idea what’s up, please?

    WP 6.7
    BP 14.2.1
    PHP 8.3

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

  • Hi,

    It is difficult tell since the error message is missing backtrace info. Furthermore, I’m not getting that error with:

    • WP 6.7
    • BP 14.2.1
    • PHP 8.3

    Just for GP and long story short, I placed the function bp_get_the_profile_field_id(); in functions.php of a child theme in an attempt to replicate the error. Query Monitor revealed the error was caused by the aforementioned function, see the following screenshot:

    screenshot

    I am still seeing this error when editing the extended profile.
    Now on:
    WP 6.9.4
    BP 2.6.4
    PHP version 8.3.30

    The following error now has trace back:

    Warning:  Attempt to read property "id" on null in /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 558
    
    Timestamp: 2026-04-20 17:13:41 UTC
    
    Stack Trace
    -----------
    1.  bp_get_the_profile_field_id('22')
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/ovni-oddments/ovni-oddments.php:213
    2.  ovni_remove_rich_text(false)
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:343
    3.  WP_Hook->apply_filters(false, Array(2))
        /home/<xxx>/public_html/ovni-owners/wp-includes/plugin.php:205
    4.  apply_filters('bp_xprofile_is_richtex...', false, 36)
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php:1217
    5.  bp_xprofile_is_richtext_enabled_for_field(36)
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-filters.php:138
    6.  xprofile_filter_kses('Welsh coast', BP_XProfile_ProfileData)
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-filters.php:225
    7.  xprofile_sanitize_data_value_before_save('Welsh coast', null, true, BP_XProfile_ProfileData)
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:341
    8.  WP_Hook->apply_filters('Welsh coast', Array(4))
        /home/<xxx>/public_html/ovni-owners/wp-includes/plugin.php:205
    9.  apply_filters('xprofile_data_value_be...', 'Welsh coast', null, true, BP_XProfile_ProfileData)
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-profiledata.php:222
    10. BP_XProfile_ProfileData->save()
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php:526
    11. xprofile_set_field_data(BP_XProfile_ProfileData, 441, 'Welsh coast', false)
        /home/kiivmr5gzlfz/public_html/ovni-owners/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-user-admin.php:209
    12. BP_XProfile_User_Admin->user_admin_load('update', 441, Array(67), '/wp-admin/users.php?pa...')
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:341
    13. WP_Hook->apply_filters(null, Array(4))
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:365
    14. WP_Hook->do_action(Array(4))
        /home/<xxx>/public_html/ovni-owners/wp-includes/plugin.php:570
    15. do_action_ref_array('bp_members_admin_updat...', Array(4))
        /home/<xxx>/public_html/ovni-owners/wp-content/plugins/buddypress/bp-members/classes/class-bp-members-admin.php:1159
    16. BP_Members_Admin->user_admin_load('')
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:341
    17. WP_Hook->apply_filters('', Array(1))
        /home/<xxx>/public_html/ovni-owners/wp-includes/class-wp-hook.php:365
    18. WP_Hook->do_action(Array(1))
        /home/<xxx>/public_html/ovni-owners/wp-includes/plugin.php:522
    19. do_action('load-users_page_bp-pro...')
        /home/<xxx>/public_html/ovni-owners/wp-admin/admin.php:242
    20. require_once('/home/<xxx>/pub...')
        /home/<xxx>/public_html/ovni-owners/wp-admin/users.php:11
    
    Context
    -------
    URL            : /wp-admin/users.php?page=bp-profile-edit&user_id=441&wp_http_referer=%2Fwp-admin%2Fusers.php%3Fid%3D441&action=update
    Referer        : https://ovni-owners.org.uk/wp-admin/users.php?page=bp-profile-edit&user_id=441&wp_http_referer=%2Fwp-admin%2Fusers.php%3Fid%3D441
    HTTP Method    : POST
    HTTP Host      : ovni-owners.org.uk
    HTTP Status    : 200
    isSSL          : Yes
    Current Filter : load-users_page_bp-profile-edit, bp_members_admin_update_user, xprofile_data_value_before_save, bp_xprofile_is_richtext_enabled_for_field
    Execution Time : 3.062 s
    Memory Usage   : 131.99 MiB
    PHP SAPI       : litespeed

    Whoops – hold off responding to this for now. I may have found the cause.

    Closing this topic. I have found it is caused by a filter of my own :-#)

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

  • The topic ‘Warning: Attempt to read property “id” on null […]bp-xprofile-template.php’ is closed to new replies.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Brajesh Singh replied to the topic User id on profile page in the forum Creating & Extending0510-01-2026
2Steve replied to the topic Error Updating the Profile Picture in the forum How-to & Troubleshooting0507-03-2026
3Renato Alves replied to the topic Technical problem on my site after installing in the forum How-to & Troubleshooting0209-02-2026
4Mike Witt replied to the topic How to hide or replace Gravatar text on profile in the forum How-to & Troubleshooting0527-06-2026
5Renato Alves replied to the topic The URLs to the pages are not working! in the forum How-to & Troubleshooting0515-01-2026
6Civil Engineering Notes started the topic Found an issue at buddypress/bp-members/classes/class-bp-members-admin.php in the forum How-to & Troubleshooting0523-04-2026
7manonetc started the topic Xprofile Fields in Activity Form in the forum How-to & Troubleshooting0230-03-2026
8Mike Witt replied to the topic Unauthenticated Arbitrary Shortcode Execution Security Vulnerability in the forum Requests & Feedback0530-01-2026
9John N replied to the topic Problem when deleting terms in the forum How-to & Troubleshooting0215-05-2026
10Indigetal WebCraft started the topic Fix `bp_is_site_home()` to ignore query strings - Ticket #9330 in the forum Requests & Feedback0505-06-2026

Классификация: Мнения. Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 2. Источник: buddypress.org.