This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year ago.

Assigned support staff: Bobby.

Author Posts
September 13, 2018 at 1:15 am

mohamedA-37

I have a problem appears when saving a woocommerce product in the original or translated language. The problem not happen to all woocommerce products just some. The problem comes with 504 Gateway timeout or the below described error;

WordPress database error: [Column 'post_id' cannot be null]
INSERT INTO `wpton_postmeta` (`meta_value`, `post_id`, `meta_key`) VALUES ('a:0:{}', NULL, '_default_attributes')

Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /home/______/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:76 Stack trace: #0 /home/______/public_html/wp-content/plugins/woocommerce-multilingual/classes/media/class-wcml-product-gallery-filter.php(36): WPML_Translation_Element->get_translation('') #1 /home/______/public_html/wp-includes/class-wp-hook.php(288): WCML_Product_Gallery_Filter->localize_image_ids(NULL, 36948, '_product_image_...') #2 /home/______/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(NULL, Array) #3 /home/______/public_html/wp-includes/meta.php(489): apply_filters('get_post_metada...', NULL, 36948, '_product_image_...', false) #4 /home/______/public_html/wp-includes/meta.php(197): get_metadata('post', 36948, '_product_image_...') #5 /home/______/public_html/wp-includes/post.php(1863): update_metadata('post', 36948, '_product_image_...', '882,883,884,88 in /home/______/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 76

September 14, 2018 at 9:21 am #2734750

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

if possible please provide me with the products that cause this issue, so i will be able to test them

also what are your results if you run the troubleshooting actions again ? i can see that you did that already a few days ago

Please go to WPML => Support , and click on "Troubleshooting" while in the Troubleshooting page please perform the actions. (specifically "set language information" but i recommend performing all of them"

additionally, please review your menus and make sure all of them have translations added and are not untranslated or left empty if they are translated.

September 14, 2018 at 2:48 pm #2735793

mohamedA-37

Check the product link, try to make an edit and save you will got a 500 Server Error and check the debug file.. For your info I contact the server provider the problem not from them
hidden link
hidden link

September 17, 2018 at 12:44 pm #2741001

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

thank you for sharing with me the error log.

bellow are the errors that are most likely causing this issue.

[13-Sep-2018 01:00:53 UTC] PHP Fatal error:  Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in /home/moham287/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:76
Stack trace:
#0 /home/moham287/public_html/wp-content/plugins/woocommerce-multilingual/classes/media/class-wcml-product-gallery-filter.php(36): WPML_Translation_Element->get_translation('')
#1 /home/moham287/public_html/wp-includes/class-wp-hook.php(288): WCML_Product_Gallery_Filter->localize_image_ids(NULL, 36948, '_product_image_...')
#2 /home/moham287/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters(NULL, Array)
#3 /home/moham287/public_html/wp-includes/meta.php(489): apply_filters('get_post_metada...', NULL, 36948, '_product_image_...', false)
#4 /home/moham287/public_html/wp-includes/meta.php(197): get_metadata('post', 36948, '_product_image_...')
#5 /home/moham287/public_html/wp-includes/post.php(1863): update_metadata('post', 36948, '_product_image_...', '13038,13040,13 in /home/moham287/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 76 
PHP Fatal error:  Uncaught Error: __clone method called on non-object in /home/moham287/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-duplicate-product.php:138
Stack trace:
#0 /home/moham287/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-wc-admin-duplicate-product.php(114): WC_Admin_Duplicate_Product->product_duplicate(false)
#1 /home/moham287/public_html/wp-content/plugins/woocommerce-multilingual/inc/translation-editor/class-wcml-wc-admin-duplicate-product.php(77): WCML_WC_Admin_Duplicate_Product->wc_duplicate_product(Object(stdClass))
#2 /home/moham287/public_html/wp-includes/class-wp-hook.php(286): WCML_WC_Admin_Duplicate_Product->woocommerce_duplicate_product(37015, Object(WC_Product_Simple))
#3 /home/moham287/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#4 /home/moham287/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#5 /home/moham287/public_html/wp-content/plugins/woocommerce/includes/admin/clas in /home/moham287/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-duplicate-product.php on line 138

The error bellow points to the plugin "facebook for woocommerce plugin" and "query monitor" plugin

[14-Sep-2018 19:28:23 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /home/moham287/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 95
[14-Sep-2018 19:28:23 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 73728 bytes) in /home/moham287/public_html/wp-includes/option.php on line 483
[14-Sep-2018 19:28:53 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /home/moham287/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 92
[14-Sep-2018 19:28:53 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 102400 bytes) in /home/moham287/public_html/wp-includes/class-wp-hook.php on line 286
[14-Sep-2018 19:28:59 UTC] PHP Notice:  Undefined property: stdClass::$id in /home/moham287/public_html/wp-content/plugins/facebook-for-woocommerce/facebook-commerce.php on line 2217
[14-Sep-2018 19:29:14 UTC] PHP Notice:  Undefined property: stdClass::$id in /home/moham287/public_html/wp-content/plugins/facebook-for-woocommerce/facebook-commerce.php on line 2217
[14-Sep-2018 19:47:00 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 20480 bytes) in /home/moham287/public_html/wp-content/plugins/query-monitor/classes/Backtrace.php on line 92
[14-Sep-2018 19:47:00 UTC] PHP Fatal error:  Allowed memory size of 805306368 bytes exhausted (tried to allocate 102400 bytes) in /home/moham287/public_html/wp-includes/class-wp-hook.php on line 286

1. Please test the following to exclude a compatibility issue causing this

-Back up your site first
-Deactivate all non WPML related plugins
-Switch for a moment to a WordPress default theme like Twenty Fourteen.
-If the issue is gone, activate one by one to see with wich one there is an interaction issue

NOTE: make sure you disable your drop-in cache plugins as well

Let me know your results please.

2. verify that you dont have any menus that are empty and any [widgets that are empty (meaning no title for the widgets)]

The topic ‘[Closed] Fatal Error’ is closed to new replies.