Error caused by child theme

Hi Team,

So happy to have a solid support team to turn to when issues like this pop up.
We’ve started to have a error appear on random woocommerce product pages throughout our X site. After a full backup, plugin conflict test we found that change the site from our X child theme to X made removed the error - but this also removes all the child theme settings.

How do we find the root of the error on the product page being caused by the child theme?
Visually the only difference on the page between the two is the edit made to the child theme to move the description box up underneath the product size options.

Can you assist to get us back up and running with the child theme?

Hello @Deesign,

Thanks for writing to us.

Regretfully the child theme customization is beyond the scope of our theme support. I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where the customization questions are answered.

Thanks for understanding

:rofl: well that was a huge let down.

Ok - let me re-phase: X Support can you help us move the product description box to appear higher up on the product page?

Your team did offer the advice to move this originally and maybe this is the source of the above error - did something change in the recent X update that would affect the code originally added to the Child Theme to move this woocommerce description up on the page?

// Move Tabs below the add to cart buttons
// =============================================================================
function move_tabs(){
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 10 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 70 );
}
add_action(‘wp’, ‘move_tabs’);
// =============================================================================

I did remove the above from the Child Theme functions file and the error was removed, so this could be the cause of the error but now we need help getting the description box back up on the page please. This has been working for 4+ years and only stopped working on the last X update. A little help please.

Hello @Deesign,

You have highlighted an older thread. We are unable to provide support for customizations under our new Support Policy.

Anyway, please make sure that the code added in your child theme’s functions.php file is not outdated. Over the past few days, we have issues like this due to the custom recent posts shortcode added in the child theme. We highly recommend that you remove the legacy recent post shortcode and use the new Posts element instead.

By the way, the given credentials have very limited privileges. You must at least change it to an “Administrator” so we can inspect your child theme.

Best Regards.

Thank you @ruenel - you helped us originally.

I’m not sure what part of the code is outdated - it worked fine until we updated X and then all our woocommerce product pages were displaying the above error to the world… not a great day.

I double checked the login and you are set as Administrator ?

Our hope today is that you can assist in moving the description box up towards the add to cart button on this Integrity page. The demo shows some description content (not in the description box) but some product description between the product title / price and add to cart but this was never available to us from the beginning for some reason, so getting that description box higher up the page is vital. I hope there are some options to assist us, especially if this update has known issues.

Fingers crossed :crossed_fingers:

Hi @Deesign,

It seems that you have added a WooCommerce filter woocommerce_get_image_size_gallery_thumbnail which is the reason behind showing the Warning messages. I have checked and commented on the filter in your child theme functions.php and it stops showing. Now to show the Product Description just under the title, you need to add the Product Short Description while adding or editing any product.

Now you need to remove the code that you have added previously to move up the tab.

Hope it helps.
Thanks

Thank you @tristup - appreciate the screenshots but I’m confused.

I left the child theme on, with the below code removed (code which was provided earlier by the Team X to help move the description tab up on the page under the add to cart button) because that seemed to remove the new errors that were appearing after we updated X.

Already removed from child theme - no errors on site, but now we need to find a new solution for what this original code was creating in the shop.

// Move Tabs below the add to cart buttons // ==================================================================
function move_tabs(){

  remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );

  add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 70 );

}
add_action('wp', 'move_tabs');
// ==================================================================

This means I could not follow your advice to remove something that has already been removed.

I don’t understand the reference to the gallery thumbnail code - because that is currently live and there are no errors (because the above culprit has already been removed)

The page you worked on now displays the description tab ABOVE the size options/add to cart button (none of the other products have this) perhaps this is due to the addition of the “Product short description”?

I opened the T-shirt product you edited and don’t see the Product short description box on the woocommerce product edit page in green above, neither on the page you edited or any other product pages I checked. Can you help us to see this meta box please?

We would be happy with the results you produced on the T-shirt page if we could move the description tap below the add to cart button.

Hi @Deesign,

It seems that it happens due to the custom JavaScript added through the Theme Options > JS, which moved the tab section to the top when the description class has been found. I went ahead and commented on that code, which resolves the issue.

Thanks

Thank you @tristup

Unfortunately this still does not address the original concern of how our woocommerce pages changed after updating X. We need to move the description tab to below the add to cart button please.
Can the js be updated to provide a solution instead of removing it?

In addition can you please advise where we edit the “Product short description”?
I can’t see where to edit that section you added on any of the admin product pages on our side.

Hello @Deesign,

You need to use the Google Chrome Developer Toolbar to check the live HTML code and find which CSS selector you need to use.

(function($) {
    $('.single-product .woocommerce-tabs').appendTo('.single-product .entry-summary');
})(jQuery);

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Kindly let us know how it goes.

Brilliant - perfect in every way :grin: Thank you @ruenel!

I’m still a little confused about the short description added by @tristup
Can someone show us where to edit this is (to edit) we can see the regular description that is in the post area and description tab but nothing about a short description or the copy he added on this product edit page.

In the t-shirt post above we can not edit or remove the added “short description” because we can’t see it in the edit product page - I would love to have access to this for all the products if possible.

Hello @Deesign,

Please see the secure note below.

Thanks.

Thank you @ruenel

I had to go and login with your support admin user to see that meta box - on our admin side it’s not there… so I wasn’t so blind :wink: appreciate the step by step, we must have this unticked or removed somehow from screen options. I’ll dive down that rabbit hole now.

Many thanks for your patience and guidance today!

Dee

You are most welcome.

1 Like

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