Skip to content Skip to sidebar

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
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

This topic contains 8 replies, has 2 voices.

Last updated by Shekhar Bhandari 1 year, 4 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
May 2, 2024 at 8:29 am

marthaS-2

WPML import and export

May 2, 2024 at 12:27 pm #15587197

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I downloaded the csv file and tried to import it and I received an error saying there are duplicated entries with same id (unique identifier). Then I changed the ids also to be unique to each others and re-imported it and It worked properly for me.

So can you make the changes to ids and make it unique to see if it works.

Look forward to your reply.

Thanks

May 2, 2024 at 10:48 pm #15589290

marthaS-2

Shekhar, where did you get it importing properly? Do you have another copy of the site running?

If I could see your example of the CSV that contains both languages posts, I would probably know what to do.

May 3, 2024 at 4:19 am #15589479

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, I used my local site to test this.

Regarding the CSV files, I have attached a screenshot showing how I fixed the Id's, I have removed most of the contents to make it easier to understand.

Look forward to your reply.

Thanks

csv_example.jpg
May 4, 2024 at 12:47 am #15593018

marthaS-2

Sorry - it's still not connecting the posts and the corresponding second language. Now it's doing even worse, because it doesn't seem to import them all, even though I've started over by wiping out all policy entries after trying a failed import.

When I import it also wipes out taxonomy terms, which I spent a bunch of time translating. I'm baffled.

I feel like I have it set up exactly like your CSV. I can't figure out what's different between mine and yours.

Here is my CSV for the first 5 as I've got it. After each time I run and import and it doesn't work, I trash and permanently delete the Policy Records and start over. So it should be always creating new records because the old policy records aren't there.

I've got French and English in the same file. I can't tell for sure, but perhaps it's wiping out the English posts when it adds the French one? I've tried setting the identifier to both {id[i]} and {_wpml_import_translation_group[1]}. Same problems.

Here is a link to the posts file:

hidden link

May 5, 2024 at 6:30 pm #15594633

marthaS-2

Update: I got the first five to translate and connect when I reduced it to just 5 records and did it without the "bundle."

But then the next ones I did were even more messed up. It also wanted to import bar-separated tags as one string and as a new tag.

I think if I understood:

— What's the difference between ID, WPML Translation ID, _wpml_translation group?
———Which of these need to be the same between English and French?
———How can post ID be arbitrary?

And also if I understood:

— Which non-custom-columns fields should (or must) be left out of an export/import for WPML Export and Import? (For instance, I don't see any use for a permalink field if it has the slug.)

Then I'd also have proper understanding and I'd be able to import these successfully and consistently. Thanks!

May 6, 2024 at 5:02 am #15594995

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello Martha 🙂

Id when used as a unique identifier needs to be unique, this is required by WP all import to differenciate duplicate entries.

To know about the other fields please visit: https://wpml.org/documentation/related-projects/wpml-export-and-import/preparing-import-files-for-wpml-export-and-import/#creating-spreadsheets-with-language-columns

Which of these need to be the same between English and French?

_wpml_import_translation_group

How can post ID be arbitrary?

The post id are added by the WordPress system so it will be unique itself. It checks for the last id available and create new onces based on it.

Which non-custom-columns fields should (or must) be left out of an export/import for WPML Export and Import? (For instance, I don't see any use for a permalink field if it has the slug.)

I don't have a set of fields list available. but yes you can leave the permalink fields as it will be generated based on the title available of slug.

Further, I suggest doing imports for only few products as a test then save those settings as template and do remaining imports later on.

Also, the categories should be imported first then the posts, so if the categories aren't there, then there can be issues. I suggest you to watch the video available here: https://wpml.org/documentation/related-projects/wpml-export-and-import/preparing-import-files-for-wpml-export-and-import/ to see a complete import process for taxonomies and posts.

Let me know if this helps.

Thanks

May 9, 2024 at 2:10 am #15608129

marthaS-2

Got distracted by something urgent that came up, but I will return to this ticket tonight after testing, please don't close 🙂

May 10, 2024 at 3:10 am #15612519

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Sure.

The topic ‘[Closed] WPML import and export’ is closed to new replies.