X theme Options is stuck on Loading

Hello,

I’ve updated X-theme PRO to the latest version: 7.01 and now the x-theme theme options is stuck on loading when i try to access it. Here’s a screenshot, that’s all I could see: https://www.dropbox.com/s/c75nt9c3vrvds8d/Screenshot%202019-09-25%2015.03.36.png?dl=0

Here’s what I’ve tried:

  1. I deactivated all the plugins and cleared the cache and it is still did not work
  2. The previous theme version did not have this issue
  3. Internal developers could take a long time to try to figure this out, I’m hoping you have a simple solution?
  • best regards

Hi @uxvine,

You might need to have the PHP memory limit of your site increased.

To do this, please edit your wp-config.php file and insert these lines:

    define( 'WP_MEMORY_LIMIT', '256M' );
    define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

Here is a details article about the PHP Memory Limit that is in our Knowledge Base:

In case the issue persists, please try to get in touch with your hosting provider and confirm to them that your PHP memory limit is increased.

If you are still having an issue, please provide us with the admin details of your site in a Secure Note so that we can check this further.

Hello @uxvine,

After further investigation, the plugin conflict test does not return anything. I am guessing that you are experiencing the issue because of the heavy modifications added in your child theme’s functions.php file. You have this:

<?php 
    // define global constant of theme
    define( 'TEMPLATE_PATH', get_template_directory() );
    define( 'TEMPLATE_URL', get_template_directory_uri() );
    error_reporting(0);

    // enqueue style sheet here
    function x_child_enqueue_site_styles(){


        $stack  = x_get_stack();
        $design = x_get_option( 'x_integrity_design' );

        if ( $stack == 'integrity' && $design == 'light' ) {
          $ext = '-light';
        } elseif ( $stack == 'integrity' && $design == 'dark' ) {
          $ext = '-dark';
        } else {
          $ext = '';
        }

      // TEMPLATE_URL . '/framework/css/dist/site/stacks/' . $stack . $ext . '.css';

        //
        // Register styles.
        //
        wp_register_style( 'x-stack', TEMPLATE_URL . '/framework/dist/css/site/stacks/' . $stack . $ext . '.css', NULL, X_VERSION, 'all' );

        wp_register_style( 'x-stack-style', get_stylesheet_directory_uri()."/style.css", NULL, X_VERSION, 'all' );

        wp_register_style( 'fancybox', get_stylesheet_directory_uri()."/css/jquery.fancybox.min.css", NULL, X_VERSION, 'all' );

       	    //
        // Enqueue styles.
        //
        wp_enqueue_style( 'x-stack-style' );
        wp_enqueue_style( 'x-stack' );
        wp_enqueue_style( 'fancybox' );


    }

    function wpdocs_theme_name_scripts() {

        wp_enqueue_script( 'fancybox', get_stylesheet_directory_uri()."/script/jquery.fancybox.min.js", "", X_VERSION, true );

        wp_enqueue_script( 'script-name', get_stylesheet_directory_uri() . '/script/script.js', array(), X_VERSION, true );
    }
    add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

    // enqueue style sheet here
    add_action( 'wp_enqueue_scripts', 'x_child_enqueue_site_styles' );

    // Remove query string from static resourcces 
    function _remove_query_strings_1( $src ){ 
      $rqs = explode( '?ver', $src );
            return $rqs[0];
    }
    // Remove query string from static resourcces 
    function _remove_query_strings_2( $src ){
      $rqs = explode( '&ver', $src );
            return $rqs[0];
    }
    // Remove query string from static resourcces 

    // Remove query string from static resourcces 

    add_filter( 'script_loader_src', '_remove_query_strings_1', 15, 1 );
    add_filter( 'style_loader_src', '_remove_query_strings_1', 15, 1 );
    add_filter( 'script_loader_src', '_remove_query_strings_2', 15, 1 );
    add_filter( 'style_loader_src', '_remove_query_strings_2', 15, 1 );

// Defer Javascripts
// Defer jQuery Parsing using the HTML5 defer property
    function defer_parsing_of_js ( $url ) {
        if ( FALSE === strpos( $url, '.js' ) ) return $url;
        if ( strpos( $url, 'jquery.js' ) ) return $url;
         if ( strpos( $url, 'api.js' ) ||  strpos( $url, 'recaptcha_ajax.js' ) ||  strpos( $url, 'arforms.js' ) ) return $url;
        return "$url' defer ";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );


    // add early access form
    // also add to scroll to top
    function add_contact_form(){
        ob_start();
        ?>
         <a href="#" class="scrollup" style="display: none;">Scroll</a>
        <div class="get_earlyaccess" id="contactus">
            <h2>Sign Up & get early access to vabotu!</h2>
            <?php echo do_shortcode('[contact-form-7 id="204" title="Get early access"]');?>
        </div>
        <?php 

        echo ob_get_clean();
    }
    add_action('wp_footer', 'add_contact_form',10);


    function modify_category_query( $query ) {
    if ( (!is_admin() && $query->is_category && $query->is_main_query()) || (!is_admin() && is_home() && $query->is_main_query())) {             
        $query->set( 'posts_per_page', 10);        
    }
  }
  add_action( 'pre_get_posts', 'modify_category_query' );


/****
 * 
 *  Blog Page Custom Pagination
 * 
****/

add_action( 'wp_ajax_nopriv_get_more_post', 'get_more_post' );
add_action( 'wp_ajax_get_more_post', 'get_more_post' );
function get_more_post() {
  if($_POST['page_no'] > 0){
    global $wp_query;
    $stack = x_get_stack();

    $catName = $_POST['categoryName'];    

    /*$style    = x_get_option( 'x_archive_style' );
    $cols     = x_get_option( 'x_archive_masonry_columns' );*/
    wp_reset_query();
    $thePosts = query_posts('post_type=post&post_status=publish&category_name='.$catName.'&posts_per_page=10&paged='. $_POST['page_no']);
    $max_num_pages = $wp_query->max_num_pages; ?>
    <?php if ( have_posts() ) : ?>
      <?php while ( have_posts() ) : the_post(); ?>
    
        <?php x_get_view( 'renew', 'content', get_post_format() ); ?>

      <?php endwhile; ?>
    <?php else : ?>
      <?php x_get_view( 'global', '_content-none' ); ?>
    <?php endif; ?>
  
  <?php 
     wp_reset_query();

  }
	die();
}

/******* Custome Nav bar for Beta Page ******/

function x_register_custom_nav_menus() {

  register_nav_menus( array(
    'beta'  => __( 'Beta Page Menu', '__x__' )
  ) );

}
add_action( 'init', 'x_register_custom_nav_menus' );


/************ Script for Revolution slider **********/

function admin_js_custom(){
  echo "<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery.perfect-scrollbar/0.6.7/js/min/perfect-scrollbar.jquery.min.js'></script>";
}
add_action('admin_head', 'admin_js_custom');

if( is_admin() ) {
  add_filter( 'script_loader_tag', 'tp_theme_filter_overrides' , 10, 4 );
}
function tp_theme_filter_overrides( $tag, $handle ) {
  return str_replace( 'defer', '', $tag );
}

I highly recommend that you temporarily deactivate the child theme and switch over to the parent theme so that we can check if X theme options will work again. If it will work, we can surely confirm that one of those lines added in the child theme’s functions.php file is causing your issue.

Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.