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 projects and translated taxonomies

Solution: Create a new Import task using NEW ITEMS, and not Existing Items

1. Import FR items and their categories. 2. Translate the taxonomies (You COULD import a single items in EN that would have all categories in it, but you would still need to match them (as in "this items is a translation of..."). 3. Synchronizing the taxonomy hierarchy. 4. Importing the EN items and their categories.

This topic contains 26 replies, has 2 voices.

Last updated by Lauren 1 year ago.

Assigned support staff: Lauren.

Author Posts
October 2, 2018 at 8:34 pm

Nickolas

I am trying to:
Map a second import in EN to a parent import in FR. However, the Unique Identifier field is no longer used in WP All Import to set the "unique IDs"...

Link to a page where the issue can be seen:
hidden link

I expected to see:
A proper way to match FR imported posts with the EN import.

Instead, I got:
No ways to map it truly.

As a reference, here is the first topic I created on this issue : https://wpml.org/forums/topic/unique-identifier-does-not-match-to-parent-posts/
I never did any follow up because we were in dev and needed not the real EN info... yet, not we want to push it live and are still stuck with the issue (and the topic was locked. Sorry for the late follow up!)

October 4, 2018 at 12:53 pm #2787538

Nickolas

Still haven't heard from you about this issue... Anything I can do about it?

October 4, 2018 at 7:54 pm #2788693

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.

If you are mapping the section correctly in the WP All Import (in the WPML section), then I would think there seems to be a problem with the unique identifier.

I typically suggest creating a new column in the file you are importing specifically to be the unique id. Then you can add this column to both of your language files. Use this field to then map the posts together, and let me know if the posts are linked after the upload. There is additional explanation about this in this section of the documentation: https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/#how-to-prepare-csv-xml-files

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

October 5, 2018 at 12:26 pm #2790683

Nickolas

Greetings

That is what I did. The unique field is "ID Revision". However, there are NO unique identifier settings used anymore by WP All Import, as shown on my screenshot.

So I know it seems a very obvious issue to solve, however, it isn't. The issue is really when trying to match with the "unique identifier": that terms and setting no longer exists in WP All Import.

I still TRIED using the "unique identifier" of WPML All Import extension, but it doesn't recognize the "ID Revision" (My own unique custom field identifier" as being the connector between language and content.

How do I go from there? For what I see, the plugin would need to be updated! :S

October 5, 2018 at 1:45 pm #2790958

Lauren
Supporter

Languages: English (English )

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

Could you please send me the files that you are using to import, along with the templates that you are using with WP All Import? This way I can test it on a clean install and see if I get the same results. You can upload these files to Google Drive or Dropbox and share the link in your next reply.

October 5, 2018 at 1:48 pm #2790976

Nickolas

Sure! If you get the Duplicator package from my ticket, the templates are all configured. I import from a URL, since I generate the file on request. Can't provide the "file" URL here directly since it's not a private box.

Get back to me if you need anything else.

October 5, 2018 at 8:39 pm #2791639

Lauren
Supporter

Languages: English (English )

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

Great, I was able to set up the test site and see the templates. You can either send me a sample file that matches the file you are generating, or send me a URL in the next reply which is marked as private. Thanks!

October 5, 2018 at 8:45 pm
October 5, 2018 at 10:03 pm #2791781

Lauren
Supporter

Languages: English (English )

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

Thanks for sending the file. I'm assuming you are using the V5 Import FR and V5 Import EN templates since that is what I saw in the WP All Import -> Manage Imports.

If you take a look at my screenshots, you can see that in the FR template you have the unique identifier set as {fr_nom_produit[1]} - {id_produit[1]}. In the EN template, you have the unique identifier set as {id_revision[1]}. These two fields need to match in order for the posts to be linked together.

Please try matching these fields with the correct unique identifier and let me know if this resolves the issue.

October 5, 2018 at 10:51 pm #2791856

Nickolas

Where, EXACTLY, do you see such setting? Because I'm not seeing ANY "unique identifier" on any of my two import settings.

Your screenshot is lacking some context for me to clearly see how/where you got that setting from. See what I DO get when I check the Import Settings.

I think I was able to reproduce how you got there : you selected to import NEW items only and not to be able to "Update" them later (Existing items).
I'm using "Existing Items", which offers different "merging" posts options. Perhaps the whole issue lie with this type of import? Can you confirm?

I haven't tested doing two "New items" import yet; since it's about 500 items (with lots of images for each), I'm holding up until I'm certain I can safely import... Cleaning up the database after that is a pain! 😀

October 8, 2018 at 3:57 pm #2796800

Lauren
Supporter

Languages: English (English )

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

Hi Nikolas, it could be that the problem is coming from trying to run an update, but you should be able to update the posts with WP All Import. I have created a test site so that you can further test without having to worry about your live site.

On the test site, I was not able to successfully run an import with the URL you provided or with the templates you provided, even in the default language. Instead, I saved a small part of the file content that you sent and created a CSV. I added just a few fields, such as name, description, image, categories. I then made sure to map the imports correctly in the WPML section and used the id_revision as the unique identifier. As you can see on the test site, the posts were imported and linked to their translations.

Please feel free to login and test on this site.
Login: hidden link
Username: demo
Password: kKcZ0kB71d0Q

October 9, 2018 at 3:02 pm #2800667

Nickolas

First thing I noticed when looking at the demo : I'm not importing Woocommerce products.
I'm importing into a custom post type called "Products" from the Divi child-theme. So I guess I can work with "article" directly in lieu of my post type.

Second : It doesn't use the duplicator package I provided, might be tricky reproducing the exact same bug there.

I'm gonna give it a few tries, see how it goes.

October 9, 2018 at 3:08 pm #2800712

Nickolas

So server ain't powerful enough to actually run the query, even at 1 per iteration...
I guess I'll have to work on my own server to test that out.

October 9, 2018 at 4:45 pm #2801184

Nickolas

So there, I'm having an issue with importing the second language (EN). Since my FR Unique identifier (when using New Items import mode) is set to ID Revision, if I try to run a second New Items Import (for the EN) with the SAME Unique identifier, it sets my FR into Draft, since it's thinking it would be the same posts...

My question is : Do I NEED my second EN import to have the same unique identifier, OR can I set another unique identifier ( let's say "{ID-Revision}-EN") but still "map" my second import to the proper FR unique identifier?

Hopefully that's clear enough a question! 😀

October 9, 2018 at 5:50 pm #2801501

Lauren
Supporter

Languages: English (English )

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

It should not set your French items to draft. I was able to import the file and match both languages in my sample using revision_id as the unique identifier. As long as you are selecting the correct language and mapping the second (translated) import to the parent (default language) import, the posts should be imported and linked each other. Without having the same exact identifier, the translations will not be linked to the French posts.

There must be something else causing the issue because the import must have matching unique identifiers in both languages. Maybe try some different options with your template. Maybe there is a custom field or a different field that you are trying to use the same import for?

Also, as I mentioned in the beginning, I think it would be best to try with a truly unique identifier, not a field that already exists in the post. Add a new column to your file and create the unique ID (1,2,3,4,5,etc) and see if that works for the import. This is the way a unique identifier is meant to be used for WPML All Import. Please let me know the results.