Actions
Bug #21941
closedbp_get_the_profile_group_edit_form_action() doesn't work right outside of xprofile edit context
Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2025-01-30
Due date:
% Done:
0%
Estimated time:
Deployment actions:
Description
I see a fairly large number of notices in the logs like this:
[30-Jan-2025 16:57:45 UTC] PHP Warning: Attempt to read property "id" on null in /var/www/webroot/ROOT/wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-template.php on line 413
I put a sniffer in place to see what was up, and it looks we're calling bp_get_the_profile_group_edit_form_action()
in places where there's no corresponding xprofile field group global:
[2025-01-30 16:55:47] https://commons.gc.cuny.edu/members/carmenfrenchstudent/invites/ [2025-01-30 16:55:47] require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/bp-nelo/buddypress.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, bp_replace_the_content, apply_filters('bp_replace_the_content'), WP_Hook->apply_filters, BP_Members_Theme_Compat->single_dummy_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require('/themes/bp-nelo/members/single/home.php'), bp_get_template_part, bp_locate_template, load_template, require('/themes/bp-nelo/members/single/member-header.php'), bp_get_the_profile_group_edit_form_action
Ray, could you please have a look to see if there's a more agnostic way to build this form action string?
Updated by Raymond Hoh 13 days ago
- Status changed from New to Staged for Production Release
Apologies for the notice! I'm using a better way to construct the profile edit URL in https://github.com/cuny-academic-commons/cac/commit/ac7d61ceb61c726288b02e8b63448f49573effc5.
Updated by Boone Gorges 13 days ago
- Status changed from Staged for Production Release to Resolved
Awesome, thanks!
Actions