• Resolved keywordadtd

    (@keywordadtd)


    hello,

    I am facing an issue related to the “Disable Gutenberg” plugin in my WordPress setup. The primary problem revolves around the inability to change the Heartbeat API intervals when the “Disable Gutenberg” plugin is activated. Despite trying various approaches, I have not been able to modify the Heartbeat API intervals effectively.

    Here is a concise breakdown of the problem and the steps I’ve taken:

    1. Manual Code in functions.php: I attempted to manually change the Heartbeat API interval by adding custom code to the functions.php file of my theme. However, even with the code in place, the Heartbeat API intervals remained unchanged.
    2. LiteSpeed Cache Integration: I explored using the LiteSpeed Cache plugin to manage Heartbeat API intervals. Despite configuring the LiteSpeed Cache settings to modify the intervals, the changes were still not reflected in the functionality. This suggests that the issue is not specific to the LiteSpeed Cache integration.
    3. Heartbeat Control Plugin: I also installed and tested the “Heartbeat Control” plugin, which is designed to provide control over the Heartbeat API intervals. However, even with this plugin active, I encountered the same problem: the Heartbeat API intervals did not change as intended.

    What’s interesting is that when I completely disable the Heartbeat API, the plugin works as expected. However, I do not want to disable the Heartbeat API entirely, as it serves important functionality.

    To gain more insight into the issue, I monitored the admin-ajax requests using the Chrome browser’s inspect network section. Despite observing these requests, I have not been able to pinpoint the exact cause of the problem.

    I’m seeking assistance to identify the root cause of this compatibility issue and find a solution that enables me to change the Heartbeat API intervals without having to disable it entirely.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Hey I’m glad to help investigate this. Just need the basic steps to repeat the issue on default WordPress site. That way I can follow along, see what’s happening, and try to resolve asap.

    Thread Starter keywordadtd

    (@keywordadtd)

    @specialk

    Thank you for your willingness to help investigate the issue I’ve been experiencing. I truly appreciate your support in resolving this matter. Here’s a summary of the situation and the steps I’ve taken:

    I encountered an issue where changing the Heartbeat interval was not functioning as expected after disabling the Gutenberg editor. To give you some context, I used the following line of code in my pure WordPress setup:

    add_filter('use_block_editor_for_post', '__return_false'); However, following this action, I noticed that attempting to modify the Heartbeat interval was not taking effect.

    Temporary Solution: As a temporary workaround, I’ve managed to find a solution by adding a script in my child theme’s functions.php file. This script enqueues a custom JavaScript file and adjusts the Heartbeat interval for edit pages of all post types. Here’s the script I’m using:

    function enqueue_custom_heartbeat_script() { if (is_admin()) { wp_enqueue_script('custom-heartbeat', get_stylesheet_directory_uri() . '/js/custom-heartbeat.js', array('jquery'), null, true); } } add_action('admin_enqueue_scripts', 'enqueue_custom_heartbeat_script');

    The custom-heartbeat.js file contains:

    jQuery(document).ready(function($) { // Change the Heartbeat interval to 60 seconds (1 minute) wp.heartbeat.interval(60); });

    I hope this information helps provide a clearer picture of the situation. Your guidance in resolving this matter would be immensely appreciated. Once again, thank you for your assistance and support.

    Best regards

    Plugin Author Jeff Starr

    (@specialk)

    Thanks all that might be useful, but first as requested in order to investigate, I just need the basic steps to repeat the issue on default WordPress. Something along the lines of

    1. Install such and such plugin or theme
    2. Activate whatever and visit somewhere
    3. Perform some action etc. until the issue appears

    That way I can follow along, see exactly what’s happening, and try to help asap. Otherwise, without the specific steps to replicate the issue, there is not much I’ll be able to do. Thanks for understanding, and let me know how I can help.

    • This reply was modified 1 year, 3 months ago by Jeff Starr.
    Plugin Author Jeff Starr

    (@specialk)

    Hi @keywordadtd, just wanted to follow up with this. It’s been a while with no reply, so I hope the issue is resolved? Or if there is anything I can do to help, please let me know. Thank you.

    Plugin Author Jeff Starr

    (@specialk)

    Hey @keywordadtd, I hope you got this sorted. It’s been a while with no reply so gonna go ahead and mark this thread as resolved to help keep the forum organized. Feel free to post again with any further questions or feedback, Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Heartbeat interval problem’ is closed to new replies.