-
Hi
I get this error frequently.Commands out of sync; you can't run this command now .... SELECT autoload FROM wp_options WHERE option_name = 'rank_math_notifications' .... shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, MyThemeShopNotification_Center->update_storage, delete_option
As you said on this ticket I tried to delete
rank_math_notifications
from thewp_options
table, but I do not have anyrank_math_notifications
!
What should I do?
-
Does it related to render_notice() function ?
because my host can not connect to google for some reason. of course, I disable google analyses on rank math dashboard.As I said I do not have any rank_math_notifications row on wp_options table,
So get rid of these logs by commenting on the bottom lines284: /wp-content/plugins/seo-by-rank-math/rank-math.php
41: /wp-content/plugins/seo-by-rank-math/includes/admin/class-notices.phpis there any other way?
Hello,
Thank you so much for getting in touch.
​Please follow these steps:
1. Update to the latest version of Rank Math Free & PRO
2. Re-create tables by clicking WP Dashboard > Rank Math > Status & Tools > Database Tools and click the Re-create database Table button.
https://i.rankmath.com/Wd9JMdHope that helps.
I use the last version 1.0.53.1
but I don’t have Re-create database Table button in tools tab!Hello,
You may need to switch from “Easy Mode” to “Advanced Mode” on the upper right corner in Rank Math > Status & Tools:
Hope that helps. Thank you and please don’t hesitate to let us know if you need our assistance with anything else.
I guess this option just appeared on the support staff’s computer!
I reinstall the plugin. everything is updated but nothing changes.please look at the video
Hello,
Are you sure you are using the latest version of the plugin?
If that doesn’t work, we might need to take a closer look at the settings. Please include your WP logins in the designated Sensitive Data section.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
I just tried logging in to your site with the access details you shared in the Sensitive Data field, but I’m getting an error message. I translated it using Google Translate:
Error: The password entered for the username is incorrect. Lost your Password?
Please check and correct the access details so we can log in to your site and take a closer look at the issue. Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Thank you for correcting the login details. I could now log in to your site, however, I could not find what is causing the error. This error message is typical to caching issues, but I can see that the cache plugin is disabled on your site. There might still be some kind of caching in place, in a
mu-plugin
or on the server-level, you may want to check up on that with your hosting provider.The error can also be explained by another plugin running a query and not completing it or clearing it correctly, so the mysql connection is left in an inconsistent state and Rank Math cannot process its own query.
As a developer myself, I can tell that the function in the referenced file cannot be responsible for this error on its own, there must some other unknown factor on your site/server. The error basically says that we cannot call the WP core function
delete_option()
on theshutdown
hook, which doesn’t make much sense, normally there shouldn’t be such limitation. Besides, this is working correctly on hundreds of thousands of sites. Of course I know that this doesn’t solve your issue, I’m just stating that the issue is most probably not in Rank Math’s code.There are a few things we can try, to troubleshoot this issue:
1. If you haven’t already, try using the Troubleshooting Mode in the Health Check plugin. The Health Check plugin is a free official tool from the wp.org plugins team, and its Troubleshooting Mode lets you as an admin test a plugin by itself, without the other plugins and with a default theme, to see if the error is related to a conflicting plugin/theme. Visitors will still see the original site without any changes while you use the Troubleshooting Mode.
2. We can try changing the priority level of our callback function on the
shutdown
hook, as the issue seems to be related to that. To do that, please open the plugin fileseo-by-rank-math/vendor/mythemeshop/wordpress-helpers/src/class-notification-center.php
and find this line in it (line number 48):
add_action( 'shutdown', array( $this, 'update_storage' ) );
Add, -10
to change the priority (from the default10
) and make our callback run before anything else:
add_action( 'shutdown', array( $this, 'update_storage' ), -10 );
3. We can also try putting the problematic function on another hook. To do this, edit the same line I mentioned above. Change
shutdown
towp_after_admin_bar_render
:
add_action( 'wp_after_admin_bar_render', array( $this, 'update_storage' ) );
4. We can try deleting one line in the code, to see if that’s the only place where it fails. For this, you need to find and delete one line in the same file
seo-by-rank-math/vendor/mythemeshop/wordpress-helpers/src/class-notification-center.php
, line number 156:
delete_option( $this->storage_key );
Please try the above points and let us know the results, that may help us find a way to prevent this error from occurring again. Thank you.
it’s so weird, I install the Health Check plugin. when everything is off event rank math, I get rank_math_notifications’ log
and for the other option which you mentioned, I have to do it on every update. don’t I?
Is there any hook for that?the second way solved the problem. but is there any hook for it?
Do I have to change the file after every update?Hello,
I’m glad that the suggestions helped. Could you please confirm that changing that line in the code did solve the issue?
I mean, adding the
-10
as priority in this line:
add_action( 'shutdown', array( $this, 'update_storage' ), -10 );
If that solves the issue, we might make the same change in a future update. Then, you won’t have to re-do the change again after updating.
Thank you. Looking forward to your reply.
No.this one is working
add_action( 'wp_after_admin_bar_render', array( $this, 'update_storage' ) );
thanks.
The ticket ‘rank_math_notifications’ is closed to new replies.