This topic has 14 replies, 3 voices, and was last updated 7 years, 5 months ago ago by Rose Tyler
Hello,
I updated both the theme and the woocommerce plugin and I get some errors. Maybe you are aware of it and you can guide me tho solve theme. Of course I can see them only when I have define(‘WP_DEBUG’, true);
At the home page I see:
Notice: Trying to get property of non-object in /home/socia582/public_html/dantemen.com/update/wp-includes/class-wp-query.php on line 3750
At the product page:
Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/classico/woocommerce/single-product.php’), wc_get_template_part, load_template, require(‘/themes/classico-child/woocommerce/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, sociality_remove_addtocart_from_single_product, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /home/socia582/public_html/dantemen.com/update/wp-includes/functions.php on line 4138
Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/classico/woocommerce/single-product.php’), wc_get_template_part, load_template, require(‘/themes/classico-child/woocommerce/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, show_email_form, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /home/socia582/public_html/dantemen.com/update/wp-includes/functions.php on line 4138
Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/classico/woocommerce/single-product.php’), wc_get_template_part, load_template, require(‘/themes/classico-child/woocommerce/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, sociality_remove_addtocart_from_archive_products, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /home/socia582/public_html/dantemen.com/update/wp-includes/functions.php on line 4138
Notice: WC_Product::get_upsells is deprecated since version 3.0! Use WC_Product::get_upsell_ids instead. in /home/socia582/public_html/dantemen.com/update/wp-includes/functions.php on line 3830
Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/classico/woocommerce/single-product.php’), wc_get_template_part, load_template, require(‘/themes/classico-child/woocommerce/content-single-product.php’), woocommerce_upsell_display, wc_get_template, include(‘/themes/classico-child/woocommerce/single-product/up-sells.php’), WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /home/socia582/public_html/dantemen.com/update/wp-includes/functions.php on line 4138
Anything I could do about those? The update of the theme was done from 1.7.1 to 1.8
Thank you in advance.
Hello,
Unfortunately, I can’t see your site http://prntscr.com/fhestr. Please check.
Also, provide wp-admin and FTP access in Private Content.
Regards,
Rose Tyler.
Hello,
You are now able to see it.
Thank you.
Hello,
Sorry for the delay.
Yu need update DB after WC update http://prntscr.com/fiu7px. Then disable 3-rd party plugins and activate parent theme to check errors.
Please note that was big woocommerce update, so many elements in the plugin and our theme functionality were changed. So you may need to edit your changes in the child theme to proper work with new versions.
Regards,
Rose Tyler.
Hello,
Thank you for the guidance. I solved most of the issues by recreating the child theme. I still see an error in the homepage. I believe this is caused by the theme cause I used one of the defaults to see if it has to do with a plugin but it disappeared. The error is: Notice: Trying to get property of non-object in /home/socia582/public_html/dantemen.com/update/wp-includes/class-wp-query.php on line 3760
Any ideas what might that be?
Thank you very much.
Hi,
I tried to activate the Parent theme and the error goes off. So I think there is something in the Child theme that cause this, can you pass us the Child theme, so that we can check what’s going wrong.
Let us know,
Thanks,
laranz.
Yes,
Check the private content for ftp credentials.
Thank you.
Hi,
I checked your child theme’s functions.php and in that you’re using is_shop() inside the pre_get_posts hook, instead that use this $query->is_post_type_archive( ‘product’ ) so the final code will be,
function sociality_remove_product_cats_shop_page( $query ) {
// Comment out the line below to hide products in the admin as well
if ( is_admin() ) return;
if ( $query->is_post_type_archive( 'product' ) && $query->is_main_query() ) {
$query->set( 'tax_query', array(
array(
'taxonomy' => 'product_cat',
'field' => 'ID',
'terms' => array( 78 ),
'operator' => 'NOT IN'
)
) );
}
}
add_action( 'pre_get_posts', 'sociality_remove_product_cats_shop_page' );
The issue is already logged here: https://github.com/woocommerce/woocommerce/issues/10625, or you can use any other solution given in that URL.
Let us know,
Thanks,
laranz.
Alright,
Thank you for the reference. I have on more concern. When I choose an option for a product with size the page loads instead of showing the pop up window for choosing weather to continue shopping or to go to cart. You can see that here http://update.dantemen.com/shop/bottoms/cut-bermuda-shorts
Any propositions?
Thank you.
And,
If you could check the error in the homepage persists.
That is all by me.
Hello,
Unfortunately, variable products won’t have Ajax add to cart.
If the problem persists only with the child theme, you need to check the customizations you’ve made in child theme files.
Regards,
Rose Tyler.
Ok thank you.
Still is it possible to do something for the error in the homepage? It shows up no matter if I have the parent or the child theme enabled now.
Thanx!
Problem solved.
It was the same issue in a plugin.
Thank you for the effort and contribution!
Hello,
You’re welcome!
I’m glad that problem was solved.
Regards,
Rose Tyler.
You must be logged in to reply to this topic.Log in/Sign up