Trouble with 'group_hierarchy_override_current_action'
-
Hi David-
I’m having a problem while trying to do something somewhat out of the ordinary. I’m attempting to use the wp_editor and WordPress media uploader on a group admin page (on the front end). The problem is that when WP makes the AJAX request to admin-ajax.php to get the images to display in the media library, group hierarchy is jumping in and dropping a 404. From my debug log, it looks like I’m causing the cascade by doing a
bp_is_current_action
check which is being caught bygroup_hierarchy_override_current_action
which is failing atcheck_slug
(it appears that the function can’t work out the groups table name). My debug log looks like:[03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Routing request [03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Current component: groups [03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Current action: category-test [03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Groups slug: [03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Are we on a user profile page?: N [03-Dec-2013 22:50:40 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE slug = 'category-test' AND parent_id = 0' at line 1 for query SELECT id FROM WHERE slug = 'category-test' AND parent_id = 0 made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, bp_init, do_action('bp_init'), call_user_func_array, bp_setup_globals, do_action('bp_setup_globals'), call_user_func_array, BP_Core->setup_globals, bp_user_has_access, bp_current_user_can, current_user_can_for_blog, call_user_func_array, WP_User->has_cap, call_user_func_array, map_meta_cap, apply_filters('map_meta_cap'), call_user_func_array, cc_group_home_setup_map_meta_cap, bp_is_current_action, bp_current_action, apply_filters('bp_current_action'), call_user_func_array, group_hierarchy_override_current_action, BP_Groups_Hierarchy->__construct, BP_Groups_Hierarchy::group_exists, BP_Groups_Hierarchy::check_slug, QueryMonitorDB->query [03-Dec-2013 22:50:40 UTC] BP Group Hierarchy - Group not found - returning 404.
If I add
if( strpos( admin_url('admin-ajax.php'), $_SERVER['REQUEST_URI'] ) ) { return $current_action; }
to
group_hierarchy_override_current_action
it works, but that could cause heartache other places, I suspect.Thanks for any troubleshooting help you can give,
-David
- The topic ‘Trouble with 'group_hierarchy_override_current_action'’ is closed to new replies.