Invalid taxonomy error with BuddyBoss and MemberPress

We are running a site with Buddyboss platform where we are using Hivepress for personal ads on the site. We are also using Memberpress in order to sell VIP memberships although people can use the site as free members as well.
But now we have found we have a conflict between Hivepress and Memberpress where some users are getting a fatal error when they try to become VIP members.

The users that get the errors are users that has a personal ad on the site. But not all. The thing is that if the user update their personal ad then they will no longer get the fatal error when purchasing a VIP membership.

I have debugged the issue and it turns out that the user has an invalid taxonomy somehow. I can’t see any difference in the database between a user with the issue and a user without the issue. But apparently there is something that causes the taxonomy to be interpreted as invalid in one case and not in the other.

In the file /hivepress/includes/models/class-model.php I have added

error_log('FILLVALUES: '.print_r($values,true));
in the function 
final public function fill( $values )
And this is what I get on a user that got the issue:
    [name] => user72alias
    [slug] => user72alias
    [description] => 
    [status] => publish
    [verified] => 
    [registered_date] => 2022-10-09 14:28:19
    [user] => 22713
    [categories] => WP_Error Object
            [errors] => Array
                    [invalid_taxonomy] => Array
                            [0] => Ogiltig taxonomi.


            [error_data] => Array

            [additional_data:protected] => Array


    [image] => 
    [snippet] => 

What can be wrong? When I look in the database the taxonomy looks alright
SELECT * FROM wp_term_relationships tr, wp_term_taxonomy tt WHERE tr.term_taxonomy_id = tt.term_taxonomy_id AND tr.object_id = [IdOfTheListingPost]
And the result of the above sql is the same after the user update the listing which make it work again.
I must be missing something. :confused:

It looks like the issue is related to the categories field in the user’s personal ad. The categories field is returning a WP_Error object with the error message “Invalid taxonomy.”

This suggests that there may be an issue with the taxonomy associated with the categories field. The taxonomy is used to organize and classify the terms in the field, and if the taxonomy is invalid or missing, it can cause issues with the field’s data.

To troubleshoot the issue:

  1. Make sure that the taxonomy associated with the categories field is properly set up and configured in the HivePress settings. Check the name, slug, and other properties of the taxonomy to make sure they are valid and match the settings for other taxonomies on the site.
  2. Check for conflicts with other plugins or themes: If the issue only occurs for certain users or in certain circumstances, there may be a conflict with another plugin or theme. Try disabling other plugins and switching to a default theme to see if the issue persists.
  3. If there is an issue with the taxonomy associated with the categories field, you can try rebuilding the taxonomy to see if that resolves the issue. You can do this by deleting the existing taxonomy and recreating it with the same name, slug, and settings. Note that this may cause some data loss if the taxonomy is used in other areas of the site.
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.