"Unable to check for updates. Try again later."

Greetings, I have been looking for a time to update one of my more involved sites from X 4.6.4. Today is a great day since it is a holiday, but when I logged in to my dashboard, I cannot seem to get the update to the latest version. Nothing is appearing for X or Cornerstone under Updates and when, under X > Home, I click “Check Now” it says, “Unable to check for updates. Try again later.” What is the problem and how can I fix it?

I just manually updated to 5.1.0 using the FTP method, but it still doesn’t let me check for automatic updates. Any ideas?

I tried to revoke my license and revalidate, but that didn’t work. Now I can’t validate at all! It keeps saying, “Uh oh, we couldn’t check if this license was valid.” and the details it gives are, “cURL error 28: connect() timed out!”

Okay, the updates randomly started to work after I tried to manually update to the latest version of the Cornerstone plugin. However, when I updated the plugin, my front-end site broke. Specifically, my header showed, but all of my cornerstone content didn’t show. The inspector gave a 404 error and said that it couldn’t find “/assets/dist/js/site/cs-head.js.min”. I had to throw up an “Under Construction” screen and revert to the old version of the plugin. Now that I have reverted, my content is back up, but I can no longer access Automatic Updates… This is really weird.

Hey there,

Please follow our update guide at https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62. Also, give us the details asked under the “Before reporting an issue” section.

Thanks.

I did follow the guide you referenced after I posted the original message. However, updating cornerstone did not produce the intended results. I first tried a manual FTP update and then (once the automatic updates resumed working), I deleted the plugin and updated via the automatic update feature. I reverted to the old version via FTP and things are now functioning again, but I don’t have the latest version of cornerstone.

I have not yet tried to test for plugin conflicts. I am not experiencing the WSOD.

Oh and by the way, you broke my site 3 hours ago when you updated cornerstone. Thanks for the heads up.

I disabled all non-themeco plugins and cornerstone content still does not show. Please, I need quick help on this! My site is live!

Ok, I might be making some progress. It seems that something in my X Child Theme is causing a problem. When I switch from my child theme to the X theme, the content reappears. Is there something I need to do to make my old child theme compatible with the 5.x version of the X theme (not Pro)? I didn’t see any difference…

Okay, maybe I am making progress here. I have a php file in my child theme which I customized that I don’t see a corresponding file to in the main theme anymore. I did some customizations to “VIEWS/INTEGRITY/_LANDMARK-HEADER.PHP” in my child theme, but I don’t see anything like that in the new theme. Has that been renamed or is there a corresponding file that that content has replaced? I’d appreciate your quick reply.

Okay, so I replaced the old Child Theme functions.php with the new blank one and my site works again. I’ve gone through the file, function by function, and added them all back in except for one. I’ve identified the one that is breaking Cornerstone. I’ll post a couple of separate posts on a few separate remaining issues.

Hello There,

Thank you for updating us in! Just for future topics, self responding or bumping your post pushes it back in our Queue system so it takes longer to respond to.

By the way, I managed to logged in to your site and checked the old functions.php file. I figured out what have cause the content not to display. It is because it throughs a fatal error when the child theme is active. That is because of one particular line (line 88) that generates the error. Please have it updated and make use of this code instead:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

// Recent Posts
// =============================================================================

function x_shortcode_recent_posts_v2code( $atts ) {
  extract( shortcode_atts( array(
    'id'          => '',
    'class'       => '',
    'style'       => '',
    'type'        => 'post',
    'count'       => '',
    'category'    => '',
    'offset'      => '',
    'orientation' => '',
    'no_image'    => '',
    'fade'        => '',
    'enable_excerpt' => ''
  ), $atts, 'x_recent_posts' ) );

  $allowed_post_types = apply_filters( 'cs_recent_posts_post_types', array( 'post' => 'post' ) );
  $type = ( isset( $allowed_post_types[$type] ) ) ? $allowed_post_types[$type] : 'post';

  $id            = ( $id          != ''          ) ? 'id="' . esc_attr( $id ) . '"' : '';
  $class         = ( $class       != ''          ) ? 'x-recent-posts cf ' . esc_attr( $class ) : 'x-recent-posts cf';
  $style         = ( $style       != ''          ) ? 'style="' . $style . '"' : '';
  $count         = ( $count       != ''          ) ? $count : 3;
  $category      = ( $category    != ''          ) ? $category : '';
  $category_type = ( $type        == 'post'      ) ? 'category_name' : 'portfolio-category';
  $offset        = ( $offset      != ''          ) ? $offset : 0;
  $orientation   = ( $orientation != ''          ) ? ' ' . $orientation : ' horizontal';
  $no_image      = ( $no_image    == 'true'      ) ? $no_image : '';
  $fade          = ( $fade        == 'true'      ) ? $fade : 'false';
  $enable_excerpt = ( $enable_excerpt == 'true' ) ? true:false;

  $js_params = array(
    'fade' => ( $fade == 'true' )
  );

  $data = cs_generate_data_attributes( 'recent_posts', $js_params );

  $output = "<div {$id} class=\"{$class}{$orientation}\" {$style} {$data} data-fade=\"{$fade}\" >";

    $q = new WP_Query( array(
      'orderby'          => 'date',
      'post_type'        => "{$type}",
      'posts_per_page'   => "{$count}",
      'offset'           => "{$offset}",
      "{$category_type}" => "{$category}"
    ) );

    if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post();
     $content_excerpt = get_the_excerpt();

      if ( $no_image == 'true' ) {
        $image_output       = '';
        $image_output_class = 'no-image';
      } else {
        $image              = wp_get_attachment_image_src( get_post_thumbnail_id(), 'entry-cropped' );
        $bg_image           = ( $image[0] != '' ) ? ' style="background-image: url(' . $image[0] . ');"' : '';
        $image_output       = '<div class="x-recent-posts-img"' . $bg_image . '></div>';
        $image_output_class = 'with-image';
      }

      $output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', 'cornerstone' ), the_title_attribute( 'echo=0' ) ) ) . '">'
                 . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">'
                   . '<div class="entry-wrap">'
                     . $image_output
                     . '<div class="x-recent-posts-content">'
                       . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>'
                       . '<div class="x-recent-posts-excerpt">' . strip_tags($content_excerpt ) . '</div>'
                       . '<div class="x-recent-posts-bottomfade"></div>'
           . '<div class="x-recent-posts-meta">'
        . '<span class="x-recent-posts-author">' . get_the_author() . '</span>'
                          . '<span class="x-recent-posts-date">' . get_the_date() . '</span>'
                       . '</div>'                    
                     . '</div>'
                   . '</div>'
                 . '</article>'
               . '</a>';

    endwhile; endif; wp_reset_postdata();

  $output .= '</div>';

  return $output;
}

add_action('wp_head', 'change_recent_posts_to_v2');

function change_recent_posts_to_v2() {
  remove_shortcode( 'x_recent_posts' );
  add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_v2code' );
}

// Excerpt Custom Length
// =============================================================================
function x_excerpt_length( $length ) {
    return 60;
}  
add_filter( 'excerpt_length', 'x_excerpt_length' );

/**
* Enqueue a custom script - you'll need to change the path to match y our site
*/
function custom_mailchimp_post_signup_script( $form_id ) {
  wp_enqueue_script( 'yikes-after-mailchimp-signup-script', get_template_directory_uri() . '/framework/js/custom-mailchimp-script.js', array( 'jquery' ), '1.0' );
}
add_action( 'yikes-mailchimp-shortcode-enqueue-scripts-styles', 'custom_mailchimp_post_signup_script' );

// Add "About the Author" to the bottom of posts
add_filter( 'the_content', 'add_author_share_button' );
function add_author_share_button($content){
  if ( is_singular('post') ) {
    $content .= do_shortcode('[author title="About the Author"]');
  }

  return $content;
}




// =============================================================================
// FUNCTIONS/INTEGRITY.PHP
// -----------------------------------------------------------------------------
// Integrity specific functions.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Entry Meta
//   02. Portfolio Tags
//   03. Individual Comment
// =============================================================================

// Entry Meta
// =============================================================================

if ( ! function_exists( 'x_integrity_entry_meta' ) ) :
  function x_integrity_entry_meta() {

 //
    // Avatar.
    //

    $avatar = sprintf( '<a href="%s" class="p-meta-avatar"><span>%s</span></a>',
      get_author_posts_url( get_the_author_meta( 'ID' ) ),
      get_avatar( get_the_author_meta( 'ID' ), 32 )
    );


    //
    // Author.
    //

    $author = sprintf( '<a href="%s" class="p-meta-author"><span>%s</span></a>',
      get_author_posts_url( get_the_author_meta( 'ID' ) ),
      get_the_author()
    );

    //
    // Date.
    //

    $date = sprintf( '<span class="p-meta-time"><time class="entry-date" datetime="%1$s">%2$s</time></span>',
      esc_attr( get_the_date( 'c' ) ),
      esc_html( get_the_date( 'M j\, Y' ) )
    );

    //
    // Categories.
    //

    if ( get_post_type() == 'x-portfolio' ) {
      if ( has_term( '', 'portfolio-category', NULL ) ) {
        $categories        = get_the_terms( get_the_ID(), 'portfolio-category' );
        $separator         = ', ';
        $categories_output = '';
        foreach ( $categories as $category ) {
          $categories_output .= '<a href="'
                              . get_term_link( $category->slug, 'portfolio-category' )
                              . '" title="'
                              . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                              . '"> '
                              . $category->name
                              . '</a>'
                              . $separator;
        }

        $categories_list = sprintf( '<span>%s</span>',
          trim( $categories_output, $separator )
        );
      } else {
        $categories_list = '';
      }
    } else {
      $categories        = get_the_category();
      $separator         = ', ';
      $categories_output = '';
      foreach ( $categories as $category ) {
        $categories_output .= '<a href="'
                            . get_category_link( $category->term_id )
                            . '" title="'
                            . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                            . '">'
                            . $category->name
                            . '</a>'
                            . $separator;
      }

      $categories_list = sprintf( '<span>%s</span>',
        trim( $categories_output, $separator )
      );
    }

    //
    // Comments link.
    //

    if ( comments_open() ) {

      $title  = apply_filters( 'x_entry_meta_comments_title', get_the_title() );
      $link   = apply_filters( 'x_entry_meta_comments_link', get_comments_link() );
      $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() );

      if ( $number == 0 ) {
        $text = __( 'Leave a Comment' , '__x__' );
      } else if ( $number == 1 ) {
        $text = $number . ' ' . __( 'Comment' , '__x__' );
      } else {
        $text = $number . ' ' . __( 'Comments' , '__x__' );
      }

      $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>',
        esc_url( $link ),
        esc_attr( sprintf( __( 'Leave a comment on: &ldquo;%s&rdquo;', '__x__' ), $title ) ),
        $text
      );

    } else {

      $comments = '';

    }

    //
    // Output.
    //

    if ( x_does_not_need_entry_meta() ) {
      return;
    } else {
      printf( '<p class="p-meta">%1$s%2$s%3$s%4$s%5$s</p>',
        $avatar,
        $author,
        $date,
        $categories_list,
        $comments
      );
    }

  }
endif;


//
//
// Bosler Custom Function, Add Audio Download Link
//
//


if ( ! function_exists( 'x_tg_featured_audio_dl' ) ) :
  function x_tg_featured_audio_dl() {

    $entry_id = get_the_ID();
    $mp3      = get_post_meta( $entry_id, '_x_audio_mp3', true );

    echo '<div class="tg-sermon-download"><a href="' . $mp3 . '"><i class="x-icon x-icon-download"></i></a></div>';

}
endif;

//
//
// Bosler Custom Function, List Categories with Images
//
//


function listCategoriesWithImages() {

echo '<div class="tg-list-categories">';

foreach(get_categories('exclude=1,8,15,16') as $cat) {
  
  if (function_exists('category_image_src')) {
     $category_image = category_image_src( array( 'size' => 'full', 'term_id' => $cat->term_id ) , false );
  } else {
    $category_image = '';
  }

       echo '<a href="http://theegeneration.org/category/' . $cat->category_nicename . '"  class="tg-list-categories-item" style="background-image:url(' . $category_image . ');">
      <div class="tg-list-categories-screen">
        <h3 class="tg-list-categories-title">' . $cat->cat_name . '</h3>
      </div>
    </a> ';

    
      } 

echo '</div>';

}

add_shortcode('tg-list-categories', 'listCategoriesWithImages');

//WPML — ONLY FLAGS 
add_filter('icl_ls_languages', 'wpml_ls_filter');
function wpml_ls_filter($languages) {
    global $sitepress;
       foreach($languages as $lang_code => $language){
                 $languages[$lang_code]['native_name'] = '';
                 $languages[$lang_code]['translated_name'] = '';
            }
    return $languages;
}

We would loved to know if this has work for you. Thank you.

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