-
AuthorPosts
-
April 4, 2023 at 10:54 am #1403496
Hi,
After changing a WooCommerce product, for example a variation and saving the product a fatal error occurs.
[Tue Apr 04 08:00:11.806652 2023] [proxy_fcgi:error] [pid 12716:tid 140643242297088] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-includes/formatting.php:1596\nStack trace:\n#0 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-includes/formatting.php(1596): preg_match()\n#1 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-includes/formatting.php(2207): remove_accents()\n#2 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(3158): sanitize_title()\n#3 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variable.php(45): wc_dropdown_variation_attribute_options()\n#4 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include(‘/home/clo…’)\n#5 /home/cloudwaysapps.com/mhanxjhzgy/public_html/wp-content/plugins/woocommerce/includ…’, referer: https://childbirthclassgale.com/wp-admin/post.php?post=57&action=edit&classic-editor=1
I did a plugin conflict test and it happens with Yoast SEO activated. After disabling Yoast there’s no issue. However with Yoast enabled and default WP theme there are no issues. So this is something with Enfold.
Can this be fixed?
Cheers,
JaapApril 5, 2023 at 7:19 pm #1403629Hey Jaap,
Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply. If you have a staging site, then please give us access to that instead. We might need to deactivate plugins and themes in order to debug your problem. Note that the error messages are not pointing to any theme files, so it’s likely not theme related.
Best regards,
RikardApril 6, 2023 at 8:30 am #1403668This reply has been marked as private.April 6, 2023 at 3:44 pm #1403720Hi,
Thanks for that. Does the same thing happen if you activate a default WordPress theme? Does the same thing happen if you deactivate all WooCommerce addons except the one which is related to the settings you are changing?
Best regards,
RikardApril 12, 2023 at 8:44 am #1404192Hi Rikard,
It doesn’t happen whit a default theme activated. Only with the combination of Enfold, WooCommerce and Yoast SEO.
Cheers,
JaapApril 12, 2023 at 6:48 pm #1404249Hi,
Thanks for the update. Could you give us exact steps on how to reproduce this problem please? I’ll try to reproduce it on a test installation.
Best regards,
RikardApril 18, 2023 at 10:55 am #1404797On the mentioned site you can open any product with variations. Edit one of the sku’s — > save product. This will trigger the error.
– Enfold installed
– Yoast SEO activeCheers,
JaapApril 18, 2023 at 8:06 pm #1404842Hi,
I tried changing the SKU for the two products in private, but it worked as it expected. Please give us more detailed instructions.
Best regards,
RikardApril 19, 2023 at 10:23 am #1404922Hi Rikard,
See the Loom video in private content
Cheers,
JaapApril 19, 2023 at 8:11 pm #1404983Hi,
Thanks for that. I tried reproducing the problem on a test site with Enfold/WooCommerce/Yoast installed, but I wasn’t able to. That means it’s likely something else on your site which is causing the problem. Could you share server error logs with us, and are we allowed to deactivate plugins for debugging purposes? Also please note that the changes to variation SKUs are actually changing, so the value which are sent are being saved.
Best regards,
RikardApril 20, 2023 at 8:48 am #1405019Hi Rikard,
You can test it on the site with troubleshooting mode enabled. (Site health plugin).
Error is in WooCommerce logs, see private content.Cheers,
JaapApril 21, 2023 at 1:43 pm #1405167Hey Jaap,
Please temporarily switch to Enfold parent theme and check if that helps.
If it doesn’t, please replicate the issue on a staging site and provide us with admin login credentials and FTP logins so we can inspect the issue further.
Cheers!
YigitApril 21, 2023 at 4:53 pm #1405179Hi Yigit,
I’ve created a copy of the site you can use to test. Enfold parent is active. Same issue.
See private content.Cheers,
JaapApril 25, 2023 at 4:34 pm #1405552Hi Jaap,
The Product Purchase Button element seem to be causing this issue. Removing it from the product resolves it. I couldn’t reproduce the issue on my local installation.
Could you share FTP logins here privately as well? We may need to pass this thread over to our developers.
Best regards,
YigitApril 25, 2023 at 4:42 pm #1405553Hi Yigit,
See ftp credentials in private content.
Cheers,
JaapMay 17, 2023 at 11:45 am #1407737Is there an update on this issue?
June 13, 2023 at 11:33 am #1410430I have the same problem as Jaap de Wit, have any solutions been found?
Thank you
June 17, 2023 at 10:52 pm #1410996Hi,
Thanks for your patience, it seems the Product Purchase Button element is causing this issue, but I’m not sure why.
I posted my test results to the Dev Team Github issues page to be reviewed, either I or a member of the team will reply when we have found a solution.
Thank you for your patience.Best regards,
MikeJune 23, 2023 at 12:38 pm #1411477Hi,
The Dev Team has added a fix for the variation product purchase button error with yoast when updating, I added a link to it below for you to test with, I’m not sure if it made the v5.6.3 update on Theme Forest. Thank you for your patienceBest regards,
MikeJuly 3, 2023 at 11:47 am #1412323Hi Mike,
The issue has been solved.
Thanks!July 3, 2023 at 12:14 pm #1412326Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Fatal error saving WooCommerce product’ is closed to new replies.