• Resolved Pacicio

    (@pacicio)


    This plugin is awesome, but increase the number of requests per page too much!

    I’ve done some testing: in backend, with plugin disabled, 45 requests. With plugin enabled, 97 requests.
    For the frontend is even worse. Disabled, 19 requests. Enabled: 58.

    I thought it was a conflict with some other plugin, so I disabled everything and got only 6 requests in backend and just one request in the frontend.
    If I enable the plugin, in the backend the requests increase to 42, in frontend to 21.

    Please fix it as soon as possible, this makes the backend almost unusable and slow down the entire website.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Phpbits got gold in their hands with this plugin. But support is lacking a bit at the moment. I would pay for development on this plugin to be honest! Licence it and improve, please 😉

    Change line 16 on includes/block-options.php from:

    add_action( 'init', 'blockopts_editor_assets', 999 );

    to:

    add_action( 'admin_init', 'blockopts_editor_assets', 999 );

    And the Gutenberg editor will not be loaded in the front end.

    @phpbits please fix this in an future release.

    To fix both the backend and front end please do the following.

    Change line 16 on includes/block-options.php from:

    add_action( 'init', 'blockopts_editor_assets', 999 );

    To:

    add_action( 'admin_enqueue_scripts', 'blockopts_editor_assets' );

    And to make sure the code is only executed when editing an gutenberg page we add the following function, also to includes/block-options.php:

    function my_is_gutenberg_page() {
        if ( function_exists( 'is_gutenberg_page' ) &&
                is_gutenberg_page()
        ) {
            // The Gutenberg plugin is on.
            return true;
        }
        $current_screen = get_current_screen();
        if ( method_exists( $current_screen, 'is_block_editor' ) &&
                $current_screen->is_block_editor()
        ) {
            // Gutenberg page on 5+.
            return true;
        }
        return false;
    }

    Then we add the following to line 38 of includes/block-options.php:

    if (my_is_gutenberg_page())
    {

    And dont forget the closing on line 59:

    }

    @opicron @pacicio Thanks a lot and my apology for late support. I’m just to busy for my upcoming wedding on first week of March. After that I’ll do more improvements with this plugin 🙂 Thanks a lot for your understanding! Cheers!

    Congratulations and thank you for your support!

    Hi Everyone,

    I’ve updated the plugin and renamed it to EditorsKit 🙂 Feel free to check if it’s working perfectly on your end now. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Too many requests in frontend and backend!!’ is closed to new replies.