Hello,
We apologize for the issues you are facing with the PHP errors in your logs. The errors you’re seeing, such as "Attempt to read property ‘labels’ on bool" and "Attempt to read property ‘singular_name’ on bool," typically indicate that a variable expected to be an object is actually returning as false
. This can happen due to various reasons, including conflicts with other plugins or themes, or issues with custom post types or taxonomies.
To troubleshoot this issue, we recommend the following steps:
-
Check for Plugin Conflicts: Deactivate all other plugins except for Rank Math and see if the errors persist. If the errors go away, reactivate the plugins one by one to identify the conflicting plugin.
-
Switch Themes: Temporarily switch to a default WordPress theme (like Twenty Twenty-One) to see if the issue is related to your current theme.
-
Debugging: Enable WordPress debugging by adding the following lines to your wp-config.php
file:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
This will log errors to a debug.log
file in the wp-content
directory, which may provide more insight into the issue.
-
Check Custom Code: If you have any custom code related to taxonomies or post types, review it to ensure it’s functioning correctly.
Unfortunately, we cannot create a version of the plugin specifically to avoid these errors without further investigation into the root cause. If you continue to experience issues after trying these steps, please reply to this ticket, and a human agent from our support team will assist you further.
Thank you for raising this concern!
Sources:
WordPress Database Error Commands Out of Sync; You Can’t Run This Command Now » Rank Math
Hello. The problem is “solved” with this code (replacing line 15 code of taxonomies.php):
if (isset($taxonomy_obj->labels->singular_name)) {
$name = $taxonomy_obj->labels->singular_name;
}
else {
$name = '';
}
I think this code should be placed in the native plugin source code and avoid users having to manually modify the plugin code.
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Unfortunately, we were not able to replicate the issue on our end. These warnings indicate that there’s a taxonomy on your website that is not properly returning an object when passed through the function get_taxonomy()
: https://developer.wordpress.org/reference/functions/get_taxonomy/
Please head over to WordPress Dashboard > Rank Math SEO > Titles & Meta and take a screenshot of the left tab that lists all post types and taxonomies so we can try to see which one could be failing.
You can use any image-sharing tool like https://imgur.com/upload to share the screenshot with us.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.