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 |
|---|---|---|---|---|---|---|
| - | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
| - | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
Tagged: Documentation request
This topic contains 10 replies, has 0 voices.
Last updated by Andreas W. 1 month, 1 week ago.
Assisted by: Andreas W..
| Author | Posts |
|---|---|
|
June 25, 2026 at 5:59 am
#18124884
|
|
|
In my wp site am using wpml and some of the products in other language are missing product and gallery image in other languages but when i update the main en language product the issue get resolved but doing this for 5000 product is difficult. Note: I have already run the "Synchronize products image galleries" in troubleshoot page, but the issue is not resolved. |
|
|
June 25, 2026 at 7:18 am
#18125041
|
|
|
Andreas W. WPML Supporter since 12/2018
Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Thank you for reaching out! To clarify, if you edit the affected translated products inside the WordPress Editor, are there actually no featured images or gallery images present? On each original product, in the right sidebar of the WordPress Editor, there are checkboxes that control whether the featured image and attached media will be duplicated to the translations. Could it be that these checkboxes were disabled for the affected products? If so, they need to be enabled individually, as there is no global option to enable them for all products if these options were disabled on individual products. Additionally, since you mentioned that updating the translations resolves the issue, you might consider using the bulk edit feature in WooCommerce. Go to Products > All Products, filter by the product translation using the language filter, and then use the bulk edit option. Saving the products again may help resolve the issue. If this does not provide a better solution, please let me know, and I can offer to take a look at your site as an admin user, for which I would need temporary access. Best regards, |
|
June 25, 2026 at 8:53 am
#18125187
|
|
|
Hi Andreas Regarding the “Product Images issue in Other Languages”: We also confirm that the original products already have the WPML media duplication options enabled and with 5,000+ products, using the standard bulk edit/resave approach is not practical as it would consume significant server resources and could potentially impact website performance. Can you please give a better alternate solution or fix it at your end. Kindly provide a private section so I may provide the temporary admin access to you or should I paste it here? |
|
|
June 25, 2026 at 3:31 pm
#18126524
|
|
|
Andreas W. Supporter |
If you go to the media library and switch the language inside the top admin bar, do you see on the bottom right corner a different media count in each language? If so, the media was not synced, and this is why it does not show up in second languages. The only way to solve this issue would be: 1) Go to WPML > Settings > Media Translation. 2) If the option for automatic media detection is enabled, disable it. Now click the button for manual settings. 3) More options should appear. 4) Select the checkboxes for existing content and click "Start Process." WPML will now create the necessary entries in the media library for each language for each media file. This may take some time, depending on how much media needs to be synchronized, but the process should not cause any performance issues on the server, as the items will be handled in batches. If this doesn't resolve the issue, please let me know. |
|
June 26, 2026 at 7:28 am
#18127354
|
|
|
Hi Andreas, I followed the same steps you instructed and can confirm that the media count is now identical across all languages. However, the original issue still persists and the translated products are still not displaying the images correctly. This issue is very urgent as the website is live and actively being used by customers. Could you please investigate this further and provide a solution as soon as possible? If you require any additional information, debug logs, or temporary access to the website, please let me know and I will provide it immediately. Thank you. |
|
|
June 27, 2026 at 1:44 am
#18129073
|
|
|
Andreas W. Supporter |
I am sorry to hear that my suggestions have not yet been able to solve this issue. I'd like to request temporary access (wp-admin and FTP) to the website to investigate the issue further. You'll find the necessary fields below the comment section if you log in to leave the next reply. The information you provide will be private, meaning only you and I can see and access it. IMPORTANT If you don't see the "wp-admin / FTP" fields, your login credentials for the post and website will be set to "PUBLIC." Do NOT publish the data unless you see the required wp-admin / FTP fields. The private reply form looks like this: When replying again, click "I still need assistance". Video: Please note that we are required to request this information individually on each ticket. We are not permitted to access any login information not specifically provided in the private reply form for this ticket. |
|
June 30, 2026 at 10:10 am
#18133026
|
|
|
Andreas W. Supporter |
I am not 100% sure if this field is related, but it seems there is a new custom field registered that was not yet set to "Copy". - images_uploaded More details: I then found an original English product, which has images, but the images are missing on the translated products: If you are in doubt, please clear the cache. To solve this issue, you might need to update all affected product translations, but take note that many of those are currently in status "Updates needed" and the products are not currently translated to 100%. |
|
July 1, 2026 at 10:44 am
#18135486
|
|
|
Hi Andreas, As I already mentioned, updating the original product does fix the issue, but we have 5,000+ products, so manually locating and updating affected products is not a practical solution. Using the WordPress bulk update option is also not reliable for a store of this size. Please investigate and resolve this issue from your end, as I have already provided the admin credentials. Let me know if you need any additional information or access from my side. |
|
|
July 1, 2026 at 11:34 am
#18135572
|
|
|
Andreas W. Supporter |
If the metadata was not copied when the products were initially translated, and the custom field settings were adjusted only afterward, then the issue can generally only be resolved by updating the product translations. The standard way to do this is by using automatic translation or by bulk-editing the products in WooCommerce so that the translations are updated. You could also try a programmatic approach. However, I strongly recommend creating a full site backup first, or, even better, testing the solution on a staging site before running it on your live site. If the issue is indeed related to the custom field setting mentioned earlier, you can try the following approach. This snippet attempts to sync the images_uploaded custom field across all products. It processes the products in batches to help avoid overloading the database. Please note that I have not tested these snippets, and custom code solutions are generally outside the scope of our support. Option 1: Sync the images_uploaded custom field
<?php
// Run via WP-CLI or a custom admin script
// Example: wp eval-file sync-images.php
function sync_images_uploaded_field_batch($limit = 200, $offset = 0) {
global $wpdb;
// Get product IDs in batches
$product_ids = $wpdb->get_col($wpdb->prepare("
SELECT ID
FROM {$wpdb->posts}
WHERE post_type = 'product'
AND post_status = 'publish'
LIMIT %d OFFSET %d
", $limit, $offset));
foreach ($product_ids as $product_id) {
// Trigger WPML sync so translations get updated
do_action('wpml_sync_custom_field', $product_id, 'images_uploaded');
// Optional: progress output if running via WP-CLI
if (defined('WP_CLI') && WP_CLI) {
WP_CLI::log("Synced product ID: {$product_id}");
}
}
}
// Process all products in batches of 200
function sync_all_products_images_uploaded() {
global $wpdb;
$total_products = $wpdb->get_var("
SELECT COUNT(*)
FROM {$wpdb->posts}
WHERE post_type = 'product'
AND post_status = 'publish'
");
$batch_size = 200;
for ($offset = 0; $offset < $total_products; $offset += $batch_size) {
sync_images_uploaded_field_batch($batch_size, $offset);
}
}
// Run the batch sync
sync_all_products_images_uploaded();
--- If manually resaving the translated products resolves the issue, you could instead try the following approach. Option 2: Resave translated products in batches
<?php
/**
* Resave translated WooCommerce products in batches.
* Place this in a custom plugin or theme functions.php.
* Trigger manually by visiting /wp-admin/?resave_translations=1
*/
add_action('admin_init', function() {
if (!isset($_GET['resave_translations'])) {
return; // Only run when explicitly requested
}
global $wpdb;
$batch_size = 200;
$offset = isset($_GET['offset']) ? intval($_GET['offset']) : 0;
// Get translated products (exclude originals)
$translated_ids = $wpdb->get_col($wpdb->prepare("
SELECT p.ID
FROM {$wpdb->posts} p
INNER JOIN {$wpdb->prefix}icl_translations t
ON p.ID = t.element_id
WHERE p.post_type = 'product'
AND p.post_status = 'publish'
AND t.source_language_code IS NOT NULL
LIMIT %d OFFSET %d
", $batch_size, $offset));
foreach ($translated_ids as $product_id) {
$post = get_post($product_id);
if (!$post) {
continue;
}
// Resave product to trigger save_post hooks
wp_update_post([
'ID' => $post->ID,
'post_content' => $post->post_content,
]);
}
echo "Processed batch starting at offset {$offset}, count: " . count($translated_ids) . "<br>";
if (count($translated_ids) === $batch_size) {
$next_offset = $offset + $batch_size;
echo "<a href='" . admin_url("?resave_translations=1&offset={$next_offset}") . "'>Run next batch</a>";
} else {
echo "All translations processed.";
}
exit;
});
|
|
July 3, 2026 at 11:56 am
#18139894
|
|
|
Hi Andreas, I want to confirm what caused these images to stop appearing in the other language versions of the products, as they were all working fine previously. Also, if I update these products, is there a chance that this issue could happen again in the future? Could you please let me know the root cause of the problem? Thank you. |
|
|
July 3, 2026 at 12:39 pm
#18139971
|
|
|
Andreas W. Supporter |
So far, it looks like there is a new custom field registered, called "images_uploaded" and this field was by default set to "Not translated". This field seems not to come from WooCommerce or WPML. It seems like setting the field to "Copy" and updating the translations solved the issue. I would need to take a copy of the site and revise the codebase to understand where this field is coming from. You could run the following test: 1) Update the translation for one affected product with the WPML Translation Editor. Does it solve the issue? 2) Now, go to WPML > Settings > Custom Field Translation and set the field "images_uploaded" to "Not translate". 3) Update another affected product again. Is the media now appearing on the translated product? If so, then the custom field might not be involved after all, and there also seems not to be any current bug on the site, as updating the product translations solves the issue. We would only be able to investgiate further if the issue is currently replicable on the site when translating a product. --- In case the custom field is not invovled, the cause might be something else, and we would need to investigate further. If this is the case, usually you would test this way: Create a staging environment of the website and try running it with a minimal setup to determine if the problem persists. 1) Deactivate all additional plugins apart from WooCommerce, WPML, and our add-ons. Now update the translation of an affected product. Does it solve the issue? 2) If the problem disappears, start reactivating the plugins one by one, or activate them in small groups. This way, check where the problem reappears to identify the culprit plugin. 3) If this doesn't resolve the issue, please switch to a default theme like Twenty Twenty-One to see if the problem might be theme-related. Once we've identified the cause, we can try to replicate the problem and then escalate it internally. I'll provide a test site with WPML for this purpose. |
The topic ‘[Closed] In my wp site am using wpml and some of the products in other language are missing product and galle…’ is closed to new replies.