This thread is resolved. Here is a description of the problem and solution.
Problem:
After importing products and categories (wpallimport) in different languages, if I switch language from Finnish to English then categories (in category widget) from other language stay (among English categories) and those links (to Finnish categories) are broken. How to fix this?
Solution:
WPML → Settings → Taxonomies Translation → Product categories (product_cat) → only show translated items.
Relevant Documentation:
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.
Tagged: Exception
This topic contains 13 replies, has 2 voices.
Last updated by Waqas Bin Hasan 1 year, 10 months ago.
Assisted by: Waqas Bin Hasan.
Author | Posts |
---|---|
August 6, 2023 at 5:43 pm #14160487 | |
robertL-62 |
Import products in 2 languages from the API using wpallimport. I also import product categories in the same imports, also in two different languages. Two separate imports, everything looks good (same amount of products in both languages). If I switch language from finnish to english then categories (in category widget) from other language stay (among english categories) and those links (to finnish categories) are broken. Please see the website and try yourself. How to fix this? What is weird also weird is that: WPML -> Support -> WooCommerce Multilingual Not installed No n/a - what does this "not installed" means here and how to fix it? What is the link to your site? hidden link |
August 7, 2023 at 10:57 am #14163079 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hello Robert, Thank you for contacting the support. I can see the problem. May I ask you to check this guide https://wpml.org/documentation/getting-started-guide/translating-widgets/ and see if widget is translated correctly? I ‘ll also advise to fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code: define( 'WP_MEMORY_LIMIT', '128M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' ); Remember to add these lines before the line where it says: And then clear the caches and check again. Please let me know if this helps or I'll try my best to help you further on the matter. Regards. |
August 7, 2023 at 2:55 pm #14164725 | |
robertL-62 |
I am using the most default "Product Categories" widget and it is automatically registered for translation. I am not planning to translate anything in WordPress manually. I am importing data straight from the API and want it to be shown as such. Why do categories from another language stay in Product Category widget and how to fix it? Memory limit has nothing to do with the issues. Please try to stay on topic with the answers. |
August 7, 2023 at 3:33 pm #14164967 | |
robertL-62 |
I import product categories together with the product this way (shown in the picture). In the API I have language parameter (&lang=en) and I get data in one language and another language. I use two wpallimport imports - one in default language and the other for translations. For categories I use piping. For example category can be: Oils > Mineral oil | Oils > Heavy duty oil I found that translating product categories manually through WPML → Taxonomy translations seems to solve the problem. If I translate default language that way then 2nd language is binded correctly. Is there a way to import product categories (multiple categories for product + subcategories) and its translations automatically? |
August 8, 2023 at 9:59 am #14168137 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates. Once you import the translations, you can only edit them manually in the native WordPress editor. See https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/ for details. Perhaps, there's something which may not be linked properly during export. This guide also has link on details about exporting data. Please check and let me know. For the issue relating WCML installed and saying not installed in support page, that shouldn't be a problem. All it matters that it is installed, active and you are able to use it. |
August 11, 2023 at 6:53 am #14186013 | |
robertL-62 |
The initial question is still unanswered. Why do the product categories of the default language (finnish) stay in the category widget after the site language is changed to the second language (english)? How to fix this? |
August 11, 2023 at 8:52 am #14186945 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
My apologies but I thought that might be relevant to the import one. However, I checked in our system and found one suspected report. But this may not be fully relevant since it specifically addresses issue relating another page builder. https://wpml.org/errata/cornerstone-classic-widgets-translations-not-displayed-on-front-end/ But "Option 1" in the workarounds may seem relevant, as I see you, perhaps, are using classic widget? REMEMBER to take full backup of site and DB before trying this option. If that doesn't help, I'll request to reproduce the issue in this sandbox hidden link. Here are latest WPML and WC plugins installed. You can activate and configure as per your site and reproduce using some example content. Please do not migrate your site here. Use this sandbox site to reproduce your issue in a minimal environment. This sandbox also uses PHP 7.4 so it can also be a good chance of eliminating any differences between your site and this environment. Please let me know when you are ready. |
August 11, 2023 at 1:37 pm #14188905 | |
robertL-62 |
In the sandbox WooCommerce Multilingual (WPML) options do not appear under wp allimport imports. Should I use my wpallimport license to make it work or how to get it to the sandbox site? |
August 11, 2023 at 1:53 pm #14188961 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Yes please use your license temporarily to setup things and then remove the license information after reproducing the issue. Since you are importing using wpallimport, it'll also be great if you provide those import files and some steps about how did you setup all this and reproduced the error in sandbox. So we can analyze things accordingly. I've set your next reply as private to share such files safely. You can upload these somewhere (i.e. hidden link) and share the download link. |
August 12, 2023 at 10:38 am #14191471 | |
robertL-62 |
In the sandbox I can not download and activate WP All Import Multilingual. I says unable to register: Site key not matching. Could you please check? Otherwise the sandbox is almost ready. |
August 14, 2023 at 8:45 am #14196015 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
My apologies, there's some technical issue when trying to update or install plugins via Commercial tab. However, I've downloaded WP All Import Multilingual from https://wpml.org/account/downloads/ and uploaded via Plugins -> Add New -> Upload. You can activate and setup accordingly. Please let me know when ready, with all the detailed steps to setup everything anew, as well as, to check the issue. |
August 14, 2023 at 10:08 am #14196467 | |
robertL-62 |
I reproduced the issue in the sandbox. I just imported two files. I did not translate anything manually as I have everything translated in the files (that at the moment mock the API where I read data from). When you go to All Import → Manage imports → there you can also download json files used for the import. |
August 14, 2023 at 11:36 am #14197009 | |
robertL-62 |
I think I managed to find a fix for this. WPML → Settings → Taxonomies Translation → Product categories (product_cat) → only show translated items. But you can also check 🙂 |
August 15, 2023 at 7:01 am #14201375 | |
Waqas Bin Hasan WPML Supporter since 05/2014
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates and I'm glad that it is fixed by adjusting the settings. I've checked in you site and SB. I'll close this ticket as resolved now, please feel free to open a new one anytime for anything WPML related. Have a great day 🙂 |