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 thread is resolved. Here is a description of the problem and solution.

Problem: I am trying to import my products in both languages, but the content is not translated. I just need to show the products in each translated version of the site.

Solution: There is a way to display the products in all languages without duplicating them. If you go to WPML -> Settings, scroll down to the Custom Post Types section and select the option to Translate or Fallback to Default Language. This should display the default language products for all languages.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by jimiP 1 year ago.

Assigned support staff: Lauren.

Author Posts
September 28, 2018 at 8:31 pm

jimiP

I am trying to:

Import an excel file through WP All Import but the import fails until WPML is deactivated.

Link to a page where the issue can be seen:

hidden link

In the admin: All Import > Manage Imports > Run Import

I expected to see:

Items importing from url using WP All Import as woocommerce products

Instead, I got:

Failed import until WPML is deactivated and import is restarted. Then import works.

WP Engine Error Log:

[Fri Sep 28 18:31:25.283560 2018] [:error] [pid 11203] [client 35.230.120.58:14710] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE '\\\\_transient\\\\_%1538150865' ORDER BY option_id LIMIT 1000; /* From [kandsservices.staging.wpengine.com/wp-cron.php?doing_wp_cron=1538159428.0375449657440185546875] in [/nas/content/staging/kandsservices/wp-content/plugins/woocommerce/includes/class-wc-cache-helper.php:184] */ made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Cache_Helper::delete_version_transients, referer: hidden link
[Fri Sep 28 18:31:30.935712 2018] [:error] [pid 29072] [client 67.167.138.234:45246] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE '\\\\_transient\\\\_%1538159468'; /* From [kandsservices.staging.wpengine.com/wp-admin/admin.php?page=pmxi-admin-import&action=process&id=13&failures=0&_wpnonce=10a7b0f547] in [/nas/content/staging/kandsservices/wp-content/plugins/wp-job-manager/includes/class-wp-job-manager-cache-helper.php:114] */ made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, PMXI_Plugin->adminInit, PMXI_Admin_Import->process, PMXI_Import_Record->process, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->save_duplicate, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->run_wpml_actions, WPML_Post_Duplication->duplicate_taxonomies, WPML_Term_Translation_Utils->duplicate_terms, WPML_Term_Translation_Utils->synchronize_terms, wp_set_object_terms, do_action('set_object_terms'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WP_Job_Manager_Cache_Helper::set_term, WP_Job_Manager_Cache_Helper::get_transient_version, WP_Job_Manager_Cache_Helper::delete_version_transients, referer: hidden link

October 1, 2018 at 4:29 pm #2778823

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

I see that the message is mentioning an issue with transients, and I have seen this deadlock error before in relation to transients. Please try following these instructions to safely remove transients.

** IMPORTANT ** Please backup a working copy of site files and database before continuing.

Update all WPML plugins & WordPress core.

Disable all plugins except WPML related and then temporarily change the theme to a default WordPress such as TwentySeventeen. With these settings, are you able to run the import?

October 2, 2018 at 5:56 pm #2782436

jimiP

Everything is up to date, plugins are deactivated (except for WPML, WP All Import, and Woocommerce), theme was changed to TwentySeventeen, and I deleted the transients from the database

When I ran the import it failed again with this error message: "Your server terminated the import process". We had our website host remove the "memory kill switch" which allowed the import to continue, however, the import still failed (and later crashed our server :)).

I believe the issue is due to the fact that we have 1,186 products and they are being duplicated to the other 6 translations. So for each product there are 6 duplicates that are trying to sync with the original and I think this is causing the "Deadlock". Before I duplicated the 1,186 products to the other translations the import was completing.

Is it possible for the products to display in the other translations without duplicating them from the original language? The products will never need to be translated from English so the duplicates aren't really necessary. I think if we can eliminate the duplicates the issue will be solved.

October 2, 2018 at 6:05 pm #2782443

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

There is a way to display the products in all languages without duplicating them. If you go to WPML -> Settings, scroll down to the Custom Post Types section and select the option to Translate or Fallback to Default Language. This should display the default language products for all languages.

Please let me know if you need any further assistance and I will be happy to help.

October 2, 2018 at 9:53 pm #2782909

jimiP

My issue is resolved now. Thank you!