Error when adding a product
-
Since a day or two we have a big problem in Woocommerce. When we adding a product with filling everything we get an error: critical error on your WordPress website.
When we go one page back and go to products you will see that the product is saved but without price, sku, pictures etc.
So we ar not able to add a product.
How can we solve this?
-
Hey, ripasolutions, I’m another WooCommerce user.
Do you have the PHP error log message associated with the critical error that you’re experiencing?
Howdy @ripasolutions
To help you further, I’d like to understand more about your setup.
Could you please send me a copy of your site’s System Status? You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
.Once you’ve done that, you can paste the text in https://gist.github.com/ and feel free to change/remove your site URL in the report for privacy reasons.
Once you have that, you can paste the Gist link here in your reply.
This is the GitHub link. Thank you!
https://ripasolutions-literate-halibut-9v5p7w5rq643xpqx.github.dev
Where can i find the PHP error log?
Howdy @ripasolutions
I’m afraid the following link loads a 404 error page:
https://ripasolutions-literate-halibut-9v5p7w5rq643xpqx.github.dev
Kindly try again.
Where can i find the PHP error log?
Please navigate to
WooCommerce > Status > Logs
and from the dropdown on the right side, please see if there are any logs starting with the words fatal-error.If so, please select
View
and copy and paste them into your reply here.Looking forward to hearing from you!
This is the PHP error log:
2022-12-27T14:14:23+00:00 CRITICAL Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "wc_custom_save_custom_fields" not found or invalid function name in /home/ripaware/public_html/wp-includes/class-wp-hook.php:310 Stack trace: #0 /home/ripaware/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #1 /home/ripaware/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /home/ripaware/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(268): do_action() #3 /home/ripaware/public_html/wp-includes/class-wp-hook.php(310): WC_Admin_Meta_Boxes->save_meta_boxes() #4 /home/ripaware/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #5 /home/ripaware/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /home/ripaware/public_html/wp-includes/post.php(4717): do_action() #7 /home/ripaware/public_html/wp-includes/post.php(4819): wp_insert_post() #8 /home/ripaware/public_html/wp-admin/includes/post.php(426): wp_update_post() #9 /home/ripaware/public_html/wp-admin/post.php(227): edit_post() #10 {main} thrown in /home/ripaware/public_html/wp-includes/class-wp-hook.php op de lijn 310
About the GitHub link. When i click on it it works. How can i provide you de code?
Hello @ripasolutions,
Checking the error code seems like thewc_custom_save_custom_fields
the function is not being called in from the following WordPress directory.This kind of problem is usually caused by a conflict with your theme or with another plugin.
The best way to determine this is to:- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.
If you do not see the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
As for uploading the system status report on the off chance the test is unavailing, then you can just post it directly here.
Let us know how it goes!This is the system status report from Woocommerce.
WordPress Environment WordPress address (URL): https://www.ripaware.nl Site address (URL): https://www.ripaware.nl WC Version: 7.2.2 REST API Version: ?</img> 7.2.2 WC Blocks Version: ?</img> 8.9.2 Action Scheduler Version: ?</img> 3.4.0 Log Directory Writable: ?</img> WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ?</img> Language: nl_NL External object cache: – Server Environment Server Info: LiteSpeed PHP Version: 8.1.13 PHP Post Max Size: 100 MB PHP Time Limit: 90 PHP Max Input Vars: 5000 cURL Version: 7.84.0 OpenSSL/1.1.1p SUHOSIN Installed: – MySQL Version: 8.0.31 Max Upload Size: 100 MB Default Timezone is UTC: ?</img> fsockopen/cURL: ?</img> SoapClient: ?</img> DOMDocument: ?</img> GZip: ?</img> Multibyte String: ?</img> Remote Post: ?</img> Remote Get: ?</img> Database WC Database Version: 7.2.2 WC Database Prefix: wp_ Totale database grootte: 2.42MB Database gegevens grootte: 2.02MB Database index grootte: 0.40MB wp_woocommerce_sessions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 0.07MB + Index: 0.04MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 0.04MB + Index: 0.04MB + Engine MyISAM wp_buckaroo_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_comments: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_efactuurdirect_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_litespeed_url: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_litespeed_url_file: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 1.10MB + Index: 0.09MB + Engine MyISAM wp_postmeta: Data: 0.15MB + Index: 0.06MB + Engine MyISAM wp_posts: Data: 0.57MB + Index: 0.05MB + Engine MyISAM wp_social_users: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_term_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_term_taxonomy: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_termmeta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_usermeta: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_stats: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_attributes_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_download_directories: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_rate_limits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_buckaroo_transactions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yith_wcwl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yith_wcwl_lists: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_indexable: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_yoast_indexable_hierarchy: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_migrations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_yoast_primary_term: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_yoast_seo_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM Post Type Counts attachment: 13 blocks: 2 customize_changeset: 148 nav_menu_item: 28 page: 13 post: 3 product: 1 revision: 140 wpcf7_contact_form: 2 yaymail_template: 11 yith_wcan_preset: 3 Security Secure connection (HTTPS): ?</img> Hide errors from visitors: ?</img> Active Plugins (14) Contact Form 7 Extension For Mailchimp: door Renzo Johnson – 0.5.63 Contact Form 7: door Takayuki Miyoshi – 5.6.4 Google Analytics for WordPress by MonsterInsights: door MonsterInsights – 8.11.0 LiteSpeed Cache: door LiteSpeed Technologies – 5.3.1 Loco Translate: door Tim Whitlock – 2.6.3 Nextend Social Login: door Nextendweb – 3.1.7 WC Buckaroo BPE Gateway: door Buckaroo – 3.5.0 WooCommerce - efactuurdirect: door efactuurdirect – 1.1.1 Premmerce Permalink Manager for WooCommerce: door premmerce – 2.3.7 MyParcel: door MyParcel – 4.15.1 WooCommerce: door Automattic – 7.2.2 Yoast SEO: door Team Yoast – 19.13 YayMail - WooCommerce Email Customizer: door YayCommerce – 3.1.6 YITH WooCommerce Wishlist: door YITH – 3.16.0 Inactive Plugins (0) Must Use Plugins (1) WordPress automation by Installatron: door – Settings API Enabled: – Force SSL: – Currency: EUR (€) Currency Position: left Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ?</img> Order datastore: WC_Order_Data_Store_CPT WC Pages Winkelbasis: #8 - /shop/ Winkelwagen: #9 - /winkelwagen/ Afrekenen: #10 - /afrekenen/ Mijn account: #11 - /mijn-account/ Algemene voorwaarden: #599 - /algemene-voorwaarden/ Theme Name: Flatsome Child Version: 3.0 Author URL: Child Theme: ?</img> Parent Theme Name: Flatsome Parent Theme Version: 3.16.4 Parent Theme Author URL: https://uxthemes.com WooCommerce Support: ?</img> Templates Overrides: flatsome/woocommerce/archive-product.php flatsome/woocommerce/cart/cart-empty.php flatsome/woocommerce/cart/cart-shipping.php flatsome/woocommerce/cart/cart.php flatsome/woocommerce/checkout/form-checkout.php flatsome/woocommerce/checkout/form-coupon.php flatsome/woocommerce/checkout/terms.php flatsome/woocommerce/checkout/thankyou.php flatsome/woocommerce/content-product-cat.php flatsome/woocommerce/content-product.php flatsome/woocommerce/content-single-product.php flatsome/woocommerce/content-widget-product.php flatsome/woocommerce/global/breadcrumb.php flatsome/woocommerce/global/quantity-input.php flatsome/woocommerce/global/wrapper-end.php flatsome/woocommerce/global/wrapper-start.php flatsome/woocommerce/loop/loop-end.php flatsome/woocommerce/loop/loop-start.php flatsome/woocommerce/loop/pagination.php flatsome/woocommerce/loop/rating.php flatsome/woocommerce/loop/result-count.php flatsome/woocommerce/loop/sale-flash.php flatsome/woocommerce/myaccount/form-login.php flatsome/woocommerce/myaccount/navigation.php flatsome/woocommerce/notices/error.php flatsome/woocommerce/notices/notice.php flatsome/woocommerce/notices/success.php flatsome/woocommerce/product-searchform.php flatsome/woocommerce/single-product/photoswipe.php flatsome/woocommerce/single-product/price.php flatsome/woocommerce/single-product/product-image.php flatsome/woocommerce/single-product/product-thumbnails.php flatsome/woocommerce/single-product/rating.php flatsome/woocommerce/single-product/related.php flatsome/woocommerce/single-product/review.php flatsome/woocommerce/single-product/sale-flash.php flatsome/woocommerce/single-product/share.php flatsome/woocommerce/single-product/short-description.php flatsome/woocommerce/single-product/tabs/tabs.php flatsome/woocommerce/single-product/title.php flatsome/woocommerce/single-product/up-sells.php flatsome/woocommerce/single-product-reviews.php flatsome/woocommerce/single-product.php flatsome/woocommerce/content-product_cat.php Admin Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ?</img> Next scheduled: 2022-12-28 10:21:41 +01:00 Options: ?</img> Notes: 39 Onboarding: completed Action Scheduler Geannuleerd: 1 Oldest: 2022-12-27 10:16:17 +0000 Newest: 2022-12-27 10:16:17 +0000 Afgerond: 261 Oldest: 2022-11-28 10:22:43 +0000 Newest: 2022-12-27 14:02:37 +0000 In afwachting: 1 Oldest: 2022-12-27 21:24:07 +0000 Newest: 2022-12-27 21:24:07 +0000 Status report information Generated at: 2022-12-27 20:21:30 +01:00 `
I already tried to activate the storefront and also there i have the same problem so the problem is not with the theme. Tommorow i will try to troubleshoot with the plugins.
i’l keep you updated. Thanks for the help!
I understand that even after switching to the default Storefront theme, the error still persists.
Kindly please try to switch to the default Storefront theme and only WooCommerce plugin is enabled, add a new product again and see if this works?
If so, as suggested by Saif above, this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.
If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.
If this did not resolve the issue, please provide the fatal error logs (if any) under
WooCommerce > Status > Logs
.Let us know how it goes!
Now i know which plugin caused the problem. I have send an e-mail to the developer. Thanks for everything guys!
Regards.
- The topic ‘Error when adding a product’ is closed to new replies.