首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >致命错误:未捕获异常' exception‘,消息为'Invalid product.’‘。

致命错误:未捕获异常' exception‘,消息为'Invalid product.’‘。
EN

Stack Overflow用户
提问于 2017-04-29 10:08:25
回答 2查看 3.4K关注 0票数 2

当试图在我们的WordPress站点中编辑一个页面时,一些页面加载正常并且是可编辑的,但是一些页面在其中一个主题模块中显示错误。这是我们所看到的:

代码语言:javascript
复制
Fatal error: Uncaught exception 'Exception' with message 'Invalid product.' in /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:133 Stack trace: #0 /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(143): WC_Product_Data_Store_CPT->read(Object(WC_Product_Bundle)) #1 /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(126): WC_Data_Store->read(Object(WC_Product_Bundle)) #2 /home/prikkabelled/public_html/wp-content/plugins/woocommerce-product-bundles/includes/class-wc-product-bundle.php(117): WC_Product->__construct('7854') #3 /home/prikkabelled/public_html/wp-content/plugins/woocommerce-product-bundles/includes/admin/meta-boxes/class-wc-pb-meta-box-product-data.php(136): WC_Product_Bundle->__construct('7854') #4 [internal function]: WC_PB_Meta_Box_Product_Data::product_data_tabs(Array) #5 /home/prikkabelled/public_html/wp-includes/class-wp-hook.php(298): call in /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 133

我们已经将主题更新到最新版本(Electro)。我们还将Visual Composer plugin、WordPress和WooCommerce更新到了最新版本。

奇怪的是,只有一些页面在页面编辑模式下显示此错误,而在前端,页面看起来正常。此错误阻止我们以任何方式编辑页面。

知道原因是什么吗?

EN

回答 2

Stack Overflow用户

发布于 2017-04-29 10:14:39

错误的意思是它所说的:

代码语言:javascript
复制
Fatal error: Uncaught exception 'Exception' with message 'Invalid product.' in /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:133
Stack trace:
  #0 /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(143): WC_Product_Data_Store_CPT->read(Object(WC_Product_Bundle))
  #1 /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(126): WC_Data_Store->read(Object(WC_Product_Bundle))
  #2 /home/prikkabelled/public_html/wp-content/plugins/woocommerce-product-bundles/includes/class-wc-product-bundle.php(117): WC_Product->__construct('7854')
  #3 /home/prikkabelled/public_html/wp-content/plugins/woocommerce-product-bundles/includes/admin/meta-boxes/class-wc-pb-meta-box-product-data.php(136): WC_Product_Bundle->__construct('7854')
  #4 [internal function]: WC_PB_Meta_Box_Product_Data::product_data_tabs(Array)
  #5 /home/prikkabelled/public_html/wp-includes/class-wp-hook.php(298): call in /home/prikkabelled/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 133

(为了可读性,我已经更正了格式。)

遵循该堆栈跟踪,您将发现抛出异常并显示消息"Invalid product“的代码。但在catchset_exception_handler()中不会捕捉到异常,因此它会使程序停止。

因为您还没有发布Minimal, Complete, and Verifiable example.,所以不可能确切地说出发生这种情况的原因,但遵循堆栈跟踪应该会让它变得显而易见。

票数 0
EN

Stack Overflow用户

发布于 2017-04-29 10:24:00

当我们停用一个名为WooCommerce产品包的插件时,这个错误就消失了。堆栈跟踪中的错误#2是一个明显的泄漏。

代码语言:javascript
复制
#2 /home/prikkabelled/public_html/staging1/wp-content/plugins/woocommerce-product-bundles/includes/class-wc-product-bundle.php(117): WC_Product->__construct('5301')

但是,我们仍然需要这个插件,所以我将这个问题报告给WooCommerce开发团队,因为错误是从他们的插件开始的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43691119

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档