• WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'stellarwp_telemetry_last_send' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, iThemesSecurity\Strauss\StellarWP\Telemetry\Telemetry\Telemetry_Subscriber->send_async_request, iThemesSecurity\Strauss\StellarWP\Telemetry\Last_Send\Last_Send->is_expired, iThemesSecurity\Strauss\StellarWP\Telemetry\Last_Send\Last_Send->get_timestamp
    WordPress database error Commands out of sync; you can't run this command now for query SELECT option_value FROM wp_options WHERE option_name = 'stellarwp_telemetry_last_send' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, iThemesSecurity\Strauss\StellarWP\Telemetry\Telemetry\Telemetry_Subscriber->send_async_request, iThemesSecurity\Strauss\StellarWP\Telemetry\Last_Send\Last_Send->set_new_timestamp, iThemesSecurity\Strauss\StellarWP\Telemetry\Last_Send\Last_Send->get_timestamp
    WordPress database error Commands out of sync; you can't run this command now for query SHOW FULL COLUMNS FROM wp_options made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, iThemesSecurity\Strauss\StellarWP\Telemetry\Telemetry\Telemetry_Subscriber->send_async_request, iThemesSecurity\Strauss\StellarWP\Telemetry\Last_Send\Last_Send->set_new_timestamp

    I use LiteSpeed ??Cache

Viewing 6 replies - 1 through 6 (of 6 total)
  • nlpro

    (@nlpro)

    Hi @sahro,

    As a temporary workaround navigate to Security > Settings and then disable the Allow Data Sharing setting in the Other section (at the bottom of the Global Settings page). Then click on the Save button.

    Disabling this option will in no way affect the protection your site receives as implemented by the plugin.

    +++ To prevent any confusion, I’m not SolidWP +++

    Hi @galbaras,

    Yes, there seems to be a filter available. Untested, but (despite) I’m convinced it should work:

    add_filter( 'stellarwp/telemetry/ithemes-security/optin_status', '__return_false' );

    Hi @galbaras,

    When you add the filter it overrules the plugin settings’ stored/persisted value at runtime. So the filters’ runtime value is not reflected in the plugin UI. Exactly like you wanted it ??

    The reason why you can’t find the filter in the code is because the hook name is partly generated/constructed.

    Line #104 in the vendor-prod/stellarwp/telemetry/src/Telemetry/Opt_In/Status.php file:

    return apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'optin_status', $status );

    I’m still thinking about how to properly test the filter … I guess that’s why I haven’t tested it yet ?? But for you, I guess, simply monitoring the log file would do.

    Looking through wp_options, I found the stellarwp_telemetry option and used the following snippet to disable its optin setting on all of my sites:

    $option = get_option( 'stellarwp_telemetry' );
    $option['plugins']['solid-security']['optin'] = false;
    update_option( 'stellarwp_telemetry', $option );

    Alas, this is just a workaround, which doesn’t resolve the problem of database actions failing during shutdown. Elsewhere, it was mentioned that this could be related to caching plugins, but I’m not sure how. Any thoughts?

    Hi @galbaras,

    That is correct but … when you decide to change the optin value of the stellarwp_telemetry option in the database, to keep things in sync you’ll also need to change the allow_tracking value in the itsec-storage option. This is what the plugin UI does (in both directions). This also means the change will be reflected in the plugin UI.

    Using the filter as mentioned earlier is easier/shorter/better and less risky. Only affects/overrules the returned value from the stellarwp_telemetry option and changes nothing in the database ?? (A minor disadvantage is that the “change” is not reflected in the plugin UI).

    • This reply was modified 3 weeks, 5 days ago by nlpro.
    nlpro

    (@nlpro)

    Hi @galbaras,

    Finally found some time to do some proper testing.

    Turns out, for the filter to function properly it needs to be hooked early in a WP request.

    Works only partially when added in the functions.php file of the active theme. Still works only partially when added by means of a code snippet plugin. The only way to get the filter fully functioning is by adding it using a MU-plugin.

    Additionally we need to hook into the filter differently. My earlier example was incorrect. Below the proper way to hook into the filter:

    add_filter( 'stellarwp/telemetry/ithemes-security/optin_status', '__return_two' );

    function __return_two( $status ) {
    $status = 2; //Inactive

    return $status;
    }
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.