Unable to auto-update PRO theme from the WP-admin

Hi,

We are unable to Unable to auto-update PRO theme from the WP-admin to the latest version. Just there is error “Theme update failed.” For reference we have attached screenshot of the errors.

Thank you and best regards,
Bibhash Karn

Hi @bibhashkarn,

Thanks for sharing the helpful information. I’m not sure why you would have this error as we’ve seen thousands of sites update successfully. It could be a problem with the permissions of your wp-content/themes folder. You can learn more by going to Tools > Site Health in your WordPress dashboard.

I would advise first reaching out to your web host to see if they can advise on why the permissions are considered inconsistent. You could also try fully deleting Pro and reinstalling it, although I don’t know if that would work if the folder permissions are not correct.

Hi, Thank you for your reply.

We checked “Site Health” but could not found any issue that can help us in the auto update of the PRO Theme.

We don’t think there is any issue with the permission as free auto updates are working well in the system. There is issue with the “PRO Theme” and “Slider Revolution” plugin that are not updating.

We tried the manual update and after manual update, we had below error at the product pages. So can you please help us in this matter.

Thank you and best regards,
Bibhash Karn

Hello Bibhash,

Thanks for updating in! To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hello,

Thank you for the response.

Please check the secure note. Provide all the access as required.

Thank you and best regards.

Hi,

We have updated PRO theme manually now. There exists error on product and post page after upgrade to the latest version. So while debugging, we found some issue with the code place at the child theme. This piece of code was reason for breaking the product and post pages.

These code were working fine with the earlier version of the PRO theme but the latest version did not support this code.

Below is the code used for social share customization from the theme.co’s forum…

--------------------------------------------------------
//Customization and addition Whatsapp social share icon on posts and products
function custom_shortcode_share( $atts ) {
  extract( shortcode_atts( array(
    'id'          => '',
    'class'       => '',
    'style'       => '',
    'title'       => '',
    'share_title' => '',
    'facebook'    => '',
    'twitter'     => '',
    'google_plus' => '',
    'linkedin'    => '',
    'pinterest'   => '',
    'reddit'      => '',
    'whatsapp'    => '',
    'email'       => '',
    'email_subject' => ''
  ), $atts, 'x_share' ) );

  $share_url        = urlencode( get_permalink() );

  if ( is_singular() ) {
    $share_url = urlencode( get_permalink() );
  } else {
    global $wp;
    $share_url = urlencode( home_url( ($wp->request) ? $wp->request : '' ) );
  }

  if ( is_singular() ) {
    $share_title = ( $share_title    != '' ) ? esc_attr( $share_title ) : get_the_title();
  } else {
    $share_title = ( $share_title    != '' ) ? esc_attr( $share_title ) : apply_filters( 'the_title', get_page( get_option( 'page_for_posts' ) )->post_title);
  }

  $share_source     = urlencode( get_bloginfo( 'name' ) );
  $share_image_info = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
  $share_image      = ( function_exists( 'x_get_featured_image_with_fallback_url' ) ) ? urlencode( x_get_featured_image_with_fallback_url() ) : urlencode( $share_image_info[0] );

  if ( $linkedin    == 'true' ) {
    $share_content    = urlencode( cs_get_raw_excerpt() );
  }

  $tooltip_attr = cs_generate_data_attributes_extra( 'tooltip', 'hover', 'bottom' );

  $id          = ( $id          != ''     ) ? 'id="' . esc_attr( $id ) . '"' : '';
  $class       = ( $class       != ''     ) ? 'x-entry-share ' . esc_attr( $class ) : 'x-entry-share';
  $style       = ( $style       != ''     ) ? 'style="' . $style . '"' : '';
  $title       = ( $title       != ''     ) ? $title : csi18n('shortcodes.share-title');
  $facebook    = ( $facebook    == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-facebook') . "\" onclick=\"window.open('http://www.facebook.com/sharer.php?u={$share_url}&amp;t={$share_title}', 'popupFacebook', 'width=650, height=270, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"fab fa-facebook-f\" ></i></a>" : '';
  $twitter     = ( $twitter     == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-twitter') . "\" onclick=\"window.open('https://twitter.com/intent/tweet?text={$share_title}&amp;url={$share_url}', 'popupTwitter', 'width=500, height=370, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"fab fa-twitter\" ></i></a>" : '';
  $google_plus = ( $google_plus == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-google-plus') . "\" onclick=\"window.open('https://plus.google.com/share?url={$share_url}', 'popupGooglePlus', 'width=650, height=226, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"x-icon-google-plus-square\" " . fa_data_icon('google-plus-square') . "></i></a>" : '';
  $linkedin    = ( $linkedin    == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-linkedin') . "\" onclick=\"window.open('http://www.linkedin.com/shareArticle?mini=true&amp;url={$share_url}&amp;title={$share_title}&amp;summary={$share_content}&amp;source={$share_source}', 'popupLinkedIn', 'width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"fab fa-linkedin-in\" ></i></a>" : '';
  $pinterest   = ( $pinterest   == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-pinterest') . "\" onclick=\"window.open('http://pinterest.com/pin/create/button/?url={$share_url}&amp;media={$share_image}&amp;description={$share_title}', 'popupPinterest', 'width=750, height=265, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"x-icon-pinterest-square\" " . fa_data_icon('pinterest-square') . "></i></a>" : '';
  $reddit      = ( $reddit      == 'true' ) ? "<a href=\"#share\" {$tooltip_attr} class=\"x-share\" title=\"" . csi18n('shortcodes.share-reddit') . "\" onclick=\"window.open('http://www.reddit.com/submit?url={$share_url}', 'popupReddit', 'width=875, height=450, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0'); return false;\"><i class=\"x-icon-reddit-square\" " . fa_data_icon('reddit-square') . "></i></a>" : '';
  $whatsapp    = ( $whatsapp  == 'true' ) ? "<a data-action=\"share/whatsapp/share\" href=\"whatsapp://send?text=". get_the_permalink() ."\" {$tooltip_attr} class=\"x-share\" title=\"" . __( 'Share via Whatsapp', 'cornerstone' ) . "\" ><i class=\"fab fa-whatsapp\" ></i></a>" : '';

  if ( $email       == 'true' ) {
    $email_subject = esc_attr( ( $email_subject != '' ) ? cs_decode_shortcode_attribute( $email_subject ) : csi18n('shortcodes.share-email-subject') );
    $mail_to_subject = esc_attr( $share_title );
    $mail_to_url = esc_url( get_permalink() );
    $mail_to = "mailto:?subject=$mail_to_subject&nbsp;&ndash;&nbsp;Hamro Shringar&amp;body=$email_subject $mail_to_url";
    $email = "<a href=\"{$mail_to}\" {$tooltip_attr} class=\"x-share email\" title=\"" . csi18n('shortcodes.share-email') . "\"><span><i class=\"fas fa-envelope\" ></i></span></a>";
  } else {
    $email = '';
  }

  $output = "<div {$id} class=\"{$class}\" {$style}>"
            . '<p>' . $title . '</p>'
            . '<div class="x-share-options">'
              . $facebook . $twitter . $google_plus . $linkedin . $pinterest . $reddit . $whatsapp . $email
            . '</div>'
          . '</div>';

  return $output;
}

function update_x_share_shortcode() {
  remove_shortcode( 'x_share' );
  add_shortcode( 'x_share', 'custom_shortcode_share' );
  remove_shortcode( 'share' );
  add_shortcode( 'share', 'custom_shortcode_share' );
}
add_action('wp_head', 'update_x_share_shortcode', 999);

We did not wait for your solution as it is live site and have active users.

So hoping for the solution in this matter too.

Thank you and best regards.

Hi Bibhash,

No problem. Glad to hear you were able to identify the problem as being with the code added to the child theme. Regrettably however, fixing your own theme customisations would fall outside the scope of our support. You may wish to consult with a developer to correct the code.

Thanks for understanding.

Hello,

Thank you for the response. The added code is taken from the theme.co’s forum and it was working in earlier version of PRO but now it is not working. So if possible please provide suggestion for this so that the customization work in current version too.

Hoping for the suggestion.

Thank you and best regards.

Hi @bibhashkarn,

I think we might be having a similar conversation on two different threads, but I’ll copy my reply over here.
In regards to what needs to be changed, I believe it will be fixed if you follow the FAQ items about the cs_get_raw_excerpt function found here: https://theme.co/content/pro4-1-x8-1-cornerstone5-1#faq

Hi,

Thank you for your response.

It’s true. We had similar conversation over. Thought on following the above link we sorted our issue on changing the function.

Thank you and best regards.

Hi Bibhash,

You’re welcome and we’re glad that it is now working properly on your end. If you have any other concerns regarding our theme features, feel free to reach us.

Thank you.

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