Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #113438

    lmndevelopment
    Participant

    I keep getting disconnected or long load times due to the visual composer plugin spiking out my available resources. I recently even went and compressed all my videos down and deleted any unneeded content to free up space, as well as upgraded my resource level to well above my current mb usage. please help me resolve this issue so I can get back to working on my site! Thanks

    #113461

    lmndevelopment
    Participant

    I found a thread regarding the same issue and attempted to input the given codes which you said worked and I recieved this error: Parse error: syntax error, unexpected end of file in /home/mymicielo1/public_html/lmn/wp-content/themes/x-child-integrity-light/functions.php on line 2

    after inputting this code:

    <script type=”text/javascript”>
    jQuery.ajaxSetup({
    beforeSend : function(xhr, setting) {
    if( setting.data == ‘action=wpb_single_image_src’ || setting.data == ‘action=heartbeat’) {
    xhr.abort();
    return false;
    }
    }
    });
    </script>
    <?php

    }

    });

    Please help, bc now I cant even go back to work on anything

    #113462

    Mrinal
    Member

    HI There,

    Thanks for writing in!

    May I know, Which hosting you’re using? And would you mind sharing your login info here as private reply? So we can take a closer look.

    #113485

    lmndevelopment
    Participant
    This reply has been marked as private.
    #113495

    lmndevelopment
    Participant
    This reply has been marked as private.
    #113540

    Rad
    Moderator

    Hi there,

    Your copied code is not gonna work because it is not complete.

    add_action('admin_head', function(){ 
      
      $user_page = get_current_screen();
      if( $user_page->post_type == 'post' || $user_page->post_type == 'page' ) {
    
    ?>
    <script type="text/javascript">
    jQuery.ajaxSetup({
      beforeSend : function(xhr, setting) {
        if( setting.data == 'action=wpb_single_image_src' || setting.data == 'action=heartbeat') {
          xhr.abort();
          return false;
        }
      }
    });
    </script>
    <?php 
    
    }
    
    });

    And you’re not gonna replace your child theme’s functions.php code. Just append that code at the very end of functions.php

    functions.php should look like this.

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    
    add_action('admin_head', function(){ 
      
      $user_page = get_current_screen();
      if( $user_page->post_type == 'post' || $user_page->post_type == 'page' ) {
    
    ?>
    <script type="text/javascript">
    jQuery.ajaxSetup({
      beforeSend : function(xhr, setting) {
        if( setting.data == 'action=wpb_single_image_src' || setting.data == 'action=heartbeat') {
          xhr.abort();
          return false;
        }
      }
    });
    </script>
    <?php 
    
    }
    
    });
    

    Thanks.

    #113558

    lmndevelopment
    Participant

    my website is back up if you could please look into resolving the visual composer eating up all my resources and losing connection especially when trying to work on my home page, thanks!

    #113560

    lmndevelopment
    Participant
    #113677

    Christopher
    Moderator

    Hi there,

    One of the reasons that I think you get that Visual Composer problem is that you use theme version 2.3 but have x-shortcode version 2.4

    Please update the theme to the latest version:

    http://theme.co/x/member/kb/updating-your-theme-and-plugins/

    Thank you.

    #114248

    lmndevelopment
    Participant

    ok thanks alot!

    #114379

    Christian
    Moderator

    You’re welcome. 🙂

    #123246

    lmndevelopment
    Participant

    I am still having the same issue! can you please help me resolve this so that I can edit my home page without losing connection, thanks.

    #123583

    Rubin
    Keymaster

    Hey There,

    can you check with support what’s your php memory limit on your shared account and get back to us? That will help us to see if it’s something server related or our theme/issues with setting it up. Thanks!

    #124511

    lmndevelopment
    Participant

    is my theme updated to the latest version yet?

    #124526

    lmndevelopment
    Participant

    I cant seem to get any work done bc the connection keeps getting lost