- This topic has 5 replies, 3 voices, and was last updated 10 months, 3 weeks ago by Tom.
November 1, 2019 at 8:57 pm #1051013Louis Stanford
Get the following errors repeating in the Customiser:
Notice: Trying to get property ‘post_title’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 825
Notice: Trying to get property ‘ID’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 825
Notice: Trying to get property ‘ID’ of non-object in /home/sahpacoz/public_html/wp-includes/nav-menu.php on line 829
– All plugins disabled except for GP Premium
– Error disappears with Twenty Nineteen
– Unedited WordPress installationNovember 1, 2019 at 8:59 pm #1051015Louis Stanford
Then, when enabling Woocommerce, I get the following errors:
Notice: product_type was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/single-product.php’), wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_single_price, wc_get_template, include(‘/plugins/woocommerce/templates/single-product/price.php’), WC_Product_Variable->get_price_html, apply_filters(‘woocommerce_get_price_html’), WP_Hook->apply_filters, lw_hide_variation_price, 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/sahpacoz/public_html/wp-includes/functions.php on line 4778
Again, these errors disappear with Twenty NineteenNovember 2, 2019 at 7:24 am #1051247DavidStaffCustomer SupportNovember 3, 2019 at 12:45 am #1051736Louis Stanford
I can confirm that there are no custom functions/elements, also no code added via the hook element.
I’ve also deleted the GeneratePress theme, re-uploaded from scratch to make sure that the files are original.November 3, 2019 at 1:56 am #1051756Louis Stanford
I’ve found a workaround (but haven’t found the cause):
“That notice is appearing because there are some items in the Menu that are leading to WooCommerce, which is not installed. We suggest that you delete Shop pages from the Menu. You can install WooCommerce if you plan to use it in the future.
Please navigate to Appearance> Menus and delete the invalid links related to the notice (in all menus).”
I do have WooCommerce installed, but I did a cleanup of my defunct menus and the problem has disappeared.
Bizarre.November 3, 2019 at 9:36 am #1052138TomLead DeveloperLead Developer
Glad you found the solution – it sounds like a bug in WooCommerce itself.
The reason it went away when you switched themes is the menus are theme-specific and are reset on theme change.
Thanks for sharing the fix! 🙂
- You must be logged in to reply to this topic.