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
Author | Posts |
---|---|
May 14, 2025 at 12:00 am #17029879 | |
sebastianS-153 |
Background of the issue: Symptoms: Questions: Thanks a lot, Sebastian |
May 14, 2025 at 2:28 pm #17032905 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Can you please try this: Best Regards, |
May 14, 2025 at 2:50 pm #17033157 | |
sebastianS-153 |
Hi Otto, thanks for your message. I spent around 5 hours troubleshooting. Can you tell me this, maybe this helps to clarify: With WPML and WP All Import: Is it possible to import a (newly) translated post for an already existing original post, if the import file ONLY contains the new translated post? Or must all import files ALWAYS also contain the existing original posts? "• Use one identical and unique value (e.g. “art-1234”) in _wpml_import_translation_group for the PT original and every EN translation row." -> You mean instead of using "1234" as the group value for the (same) EN and PT article, I should use "art-1234" for both? And the next article would then use "art-3456" - did I understand correctly? So mixing static characters with flexible numerical? "• Set import type to update existing posts (match by ID/Unique SKU)" -> This I do not fully understand. Assume I have only one existing PT post. Now I want to import the English translation for this post. I need to also use "update existing posts"? Even if the English post does not exist on the site (yet)? "• Re-import with WP All Import Pro" -> You say in the end here "Run Import again" -> you mean to run the fill import again with WP All Import Pro? With the same file? So basically importing twice? Thanks a lot, Sebastian |
May 14, 2025 at 6:08 pm #17034058 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello Sebastian, The short answer is: Detailed explanation: 1. Can I import only the translation file? ⸻ 2. What should the _wpml_import_translation_group look like? ⸻ 3. Why “Update existing posts (match by ID)” when the English post doesn’t exist yet? ⸻ 4. Do I really need to “Run Import again”? ⸻ 5. Practical workflow that covers both scenarios If originals already have the meta If originals don’t have the meta Either way, use the same _wpml_import_translation_group in every row that belongs together, set _wpml_import_language_code to en (for the translation) and _wpml_import_source_language_code to pt-pt.  Best Regards, |
May 14, 2025 at 7:25 pm #17034205 | |
sebastianS-153 |
Hi Otto, thanks a lot for the detailed answer. I wish I could replicate, but on my end when I import the file with the EN posts -> they are not mapped. I actually see that the _wpml_import_translation_group ID I gave them inside the import file changes (I can see so by exporting them again). I took a loom, I hope it helps figure this out: hidden link The loom ended a few second too early -> but inside the export file I created in the end, as suspected, the 2 EN posts each received an entirely new group ID. Also the pt-pt value I added to the _wpml_import_source_language_code field was empty. BUT: If I import ALL 4 posts together in the same file -> THEN mapping works. But it does not work when I only want to import the translated posts. Thanks a lot for your help, |
May 14, 2025 at 8:02 pm #17034334 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Thanks for the detailed explanation. I guess importing both languages (updating existing products) is not a suitable workaround for your use case? 🙂 Can you please try the following: Best Regards, |
May 14, 2025 at 8:09 pm #17034337 | |
sebastianS-153 |
Hi Otto, thanks for the answer. What you suggested also works, so things get mapped correctly (I already saw thie behaviour yesterday evening): - Run the PT import/refresh Basically I assume WPML here then has the imported items in "cache" and is able to map them. Is what I am seeing expected (so in my loom)? I just need to know in order to setup our process to then make sure we do not break anything. Or should it normally also work like in your previous message, so that I should be able to import files separately. Thanks a lot |
May 14, 2025 at 8:14 pm #17034340 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hi Sebastian, Sorry, I wasn't clear in my previous message. Yes, that's the expected behaviour. You can import separate files, but run the WPML matching process only once. After that, things are cleared and metadata is removed. The metadata that links the original and translation should be available before running the WPML process (running one or several imports) and it's cleared after. Best Regards, |
May 14, 2025 at 8:15 pm #17034344 | |
sebastianS-153 |
Got it, thanks! |
May 14, 2025 at 8:16 pm #17034346 | |
sebastianS-153 |
Got it, thanks for your support! |
May 14, 2025 at 8:17 pm #17034348 | |
Otto WPML Supporter since 09/2015
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, I am glad it helped. I am closing the ticket then, if you need anything else don't hesitate to open a new one. Best Regards, |