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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 14:00 – 17:00 | 14:00 – 18:00 | 14:00 – 18:00 | 13:00 – 17:00 | 13:00 – 17:00 | - |
Supporter timezone: Europe/Zagreb (GMT+01:00)
Tagged: Custom Work
This topic contains 0 replies, has 0 voices.
Last updated by geertP 2 hours, 35 minutes ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
January 27, 2025 at 12:58 pm #16637777 | |
geertP |
Background of the issue: Symptoms: Stack trace: The inriver-sync plugin is our custom sync. Questions: |
January 28, 2025 at 9:24 am #16640483 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support! It seems the issue arises due to incomplete or unexpected data when product variants exist only in non-main languages, leading to WPML hooks failing during synchronization. To investigate further, could you provide us with access to a staging site where such products with errors are present, the code triggering the issue, and database access (e.g., via a plugin like https://wordpress.org/plugins/pexlechris-adminer/? It would be helpful if you could share steps or a method to reproduce this issue, such as calling the relevant function. Regards, |
January 30, 2025 at 12:06 pm #16651256 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
I am checking this with our 2nd tier and will keep you posted. |
January 31, 2025 at 8:16 am #16654189 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Based on our initial review, it appears that the issue may be related to how the custom plugin handles translation packages for product variations. To better understand and assist you effectively, could you please provide the following details? 1. Can you share more information about the custom plugin in use? Does it manage variations in any specific way that could interfere with WCML’s automatic handling? Looking forward to your response. |
February 3, 2025 at 10:28 am #16662210 | |
geertP |
Below you can find our answers to your questions: In our custom plugin, we do the following steps The XML-file where the problem occurs will not be moved to the done folder on the mp-server. If you trigger the sync again, it will try to continue with that file and crash again so you don’t have to move the files during debugging. There is no visual reference since everything works in the background. The only thing we have is the error log where we get the next error: Stack trace: #0 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(319): array_filter(false) #1 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php(92): WPML_Element_Translation_Package->add_custom_field_contents(Array, NULL, Array, Array) #2 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-action-helper.class.php(13): WPML_Element_Translation_Package->create_translation_package(NULL) #3 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/inc/actions/wpml-tm-post-actions.class.php(72): WPML_TM_Action_Helper->create_translation_package('5841') #4 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(947): WPML_TM_Post_Actions->save_post_actions(5844, Object(WP_Post), 9) #5 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/class-wp-hook.php(324): wpml_tm_save_post(5844, Object(WP_Post), 9) #6 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #7 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(213): do_action('wpml_tm_save_po...', 5844, Object(WP_Post), false) #9 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-frontend-post-actions.class.php(61): WPML_Post_Translation->after_save_post('19003', Array, 'nl', NULL) #10 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/class-wp-hook.php(326): WPML_Frontend_Post_Actions->save_post_actions(5844, Object(WP_Post)) #11 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #12 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/post.php(5060): do_action('save_post', 5844, Object(WP_Post), true) #14 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/post.php(5162): wp_insert_post(Array, false, true) #15 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php(247): wp_update_post(Array) #16 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(196): WC_Product_Variation_Data_Store_CPT->update(Object(WC_Product_Variation)) #17 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(1469): WC_Data_Store->update(Object(WC_Product_Variation)) #18 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/inriver-sync/functions/woocommerce/product-variation.php(44): WC_Product->save() #19 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/inriver-sync/functions/woocommerce/product.php(134): set_product_variation(5843, Array, 5844) #20 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/inriver-sync/functions/xml.php(32): set_wc_product(Array, 5843) #21 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/inriver-sync/functions/sync.php(38): xml_product_sync('/data/sites/web...') #22 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/themes/ics/templates/tpl-product-sync.php(13): product_sync() #23 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/themes/ics/base.php(80): include('/data/sites/web...') #24 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-includes/template-loader.php(106): include('/data/sites/web...') #25 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-blog-header.php(19): require_once('/data/sites/web...') #26 /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/index.php(17): require('/data/sites/web...') #27 {main} thrown in /data/sites/web/website-in-progressbe/subsites/aquaplan2024.website-in-progress.be/wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/class-wpml-element-translation-package.php on line 319 This is the best implementation we could find with the limited documentation for a custom integration. If there is a better way to implement something like this, we would love to hear about it. |
February 3, 2025 at 2:15 pm #16663233 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Thank you for additional info. To troubleshoot this problem, I'll install the Duplicator plugin and generate packages for further debugging purposes. I'll ensure to exclude all media files to maintain a minimal package size. You can find more information about the process here: [link](https://wpml.org/faq/provide-supporters-copy-site/). Please confirm if this approach is acceptable to you. Our 2nd tier will have to debug this locally to see why it fails. |
February 3, 2025 at 2:28 pm #16663339 | |
geertP |
This is ok, thanks |