I recently noticed that Rank Math's sitemap.xml is no longer working on my site. After doing some digging and disabling code in my theme I noticed that whenever I removed the Metabox Relationships declarations the sitemap started working again. An example of the code I am commenting out can be found below:
<?php
/**
* MetaBox CPT Relationships Declarations
*
* @package Effiliate
*/
// Exit if accessed directly.
defined('ABSPATH') || exit;
add_action( 'mb_relationships_init', function() {
MB_Relationships_API::register( [
'id' => 'operator_to_game',
'from' => 'operator',
'to' => 'game',
] );
MB_Relationships_API::register( [
'id' => 'operator_to_payment',
'from' => 'operator',
'to' => 'payment',
] );
MB_Relationships_API::register( [
'id' => 'operator_to_bonus',
'from' => 'operator',
'to' => 'bonus',
] );
MB_Relationships_API::register( [
'id' => 'operator_to_regulator',
'from' => 'operator',
'to' => 'regulator',
] );
} );
I also have the mb-rankmath installed however it seems that this does not make any difference.