Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an issue where only the first 200 posts were being assigned to the correct languages during an import process using WP All Export / Import PRO and WPML Import. The error message indicated 'Setting Posts’ Language (200/7809 items) 7609 skipped'.
Solution:
The client discovered that the issue was due to a default limit set in the WPML Import plugin's code. By modifying the constants

DEFAULT_LIMIT

in the files

./classes/Commands/Base/CleanupFields.php

and

./classes/Commands/Base/SetEntitiesLanguage.php

from 200 to 10000, the import functioned correctly. We have noted this adjustment for future reference.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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: 

This topic contains 0 replies, has 1 voice.

Last updated by Dražen 5 days, 17 hours ago.

Assisted by: Dražen.

Author Posts
February 26, 2025 at 6:43 pm #16752908

maurizioM-27

Background of the issue:
I am trying to import 7,809 posts (2,603 in 3 languages) into our KAC website using WP All Export / Import PRO and WPML Import. The import of categories and tags works fine, but the posts are not being properly reassigned. I have tried the same batch on a different website with the same result. Link to a page where the issue can be seen: hidden link

Symptoms:
Only the first 200 posts are assigned to the relevant languages, and everything else is skipped. The error message is 'Setting Posts’ Language (200/7809 items) 7609 skipped'.

Questions:
Why are only the first 200 posts being assigned to languages?
How can I ensure all posts are assigned to their respective languages?

February 26, 2025 at 7:30 pm #16753181

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

As promised, here are the instructions. I've enabled the field, so you can share the WeTransfer safely.

https://wpml.org/ko/faq/provide-supporters-copy-site/

February 27, 2025 at 2:04 pm #16756561

maurizioM-27

any feedback ?

February 28, 2025 at 10:08 am #16760093

maurizioM-27

Dear Lucas Vidal, dear WPML colleagues
I wonder if there is any progress on this investigation.

February 28, 2025 at 10:42 am #16760231

maurizioM-27

OUCH.... I cannot be stuck....

while waiting I checked the code of your plugin
wpml-import
where you have defined 2 constants
./classes/Commands/Base/CleanupFields.php: const DEFAULT_LIMIT = 200;
./classes/Commands/Base/SetEntitiesLanguage.php: const DEFAULT_LIMIT = 200;

>>> they are the killers....

I modified as
./classes/Commands/Base/CleanupFields.php: const DEFAULT_LIMIT = 10000;
./classes/Commands/Base/SetEntitiesLanguage.php: const DEFAULT_LIMIT = 10000;

and your baby works as necessary (until I will not push above 10'000 posts....)
coffee offered at the next renewal or WPNL licences ?
😉
Thank you anyway

REE #2 - posts after WPML import - ALL ok NONE skipped.png
March 3, 2025 at 8:41 am #16767297

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

thanks for getting back and sharing this info; it would be helpful for other users with similar cases. 🙂

Glad to hear it works now, and we will note this for future cases.

Kind regards,
Drazen