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 topic contains 14 replies, has 1 voice.
Last updated by ahmedH-37 1 week, 3 days ago.
Assisted by: Claudio Palacios.
| Author | Posts |
|---|---|
| April 21, 2026 at 11:07 am #17983783 | |
|
ahmedH-37 |
The site was perfectly translated on the staging site before deploying it. Now that it's deployed, many URLs are not appearing translated but they are translated in the advanced editor. For example, the button in the hero banner (home page). Also, the buttons in the product categories are still in english, those were well translated in the staging site... |
| April 21, 2026 at 11:52 am #17984039 | |
|
ahmedH-37 |
I was able to do a workaround. Finally instead of putting the link on the section, i added it in the button. It changes the intention but it works for now. Now I have a bigger issue though, it's about the product category archive : hidden link It's not respecting the woo product template so I had to revert it to WordPress translation editor to change the categories that are linked to that template. But even when I do this change manually, it always reverts back to the EN product categories (see page settings). |
| April 21, 2026 at 2:41 pm #17984700 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Thank you for your patience. I'd like to move forward with a more comprehensive investigation approach. Since the translations are working correctly on your staging site but not displaying on the live site, I'd like to use Duplicator Pro to create a secure local copy of both environments. This will allow me to: - Replicate your exact setup with all plugins, theme configurations, and WPML settings To proceed, I'll need: - Admin access to your staging site (where the translations are displaying correctly) — this will help me understand the correct configuration This approach ensures that: - Your sites remain completely secure and unaffected during troubleshooting Would you be able to provide these admin credentials? I will mark the next reply as private for security purposes. Alternatively, if providing direct admin access isn't possible, would you be able to create the Duplicator Pro backups yourself and share the download link(s) with me privately? Looking forward to hearing from you. Best regards, |
| April 24, 2026 at 5:14 pm #17993640 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Thank you for the update, that actually confirms exactly what we found during our investigation. The root cause is a WPML/Kadence conflict: the _kad_wootemplate_show_conditionals meta field (which stores which product categories a template applies to) is not declared in Kadence's WPML configuration, so WPML defaults to copying it verbatim from the English source to the French translation. Every time the English template is saved, WPML overwrites the French version's category selection with the English term IDs — which is why your manual changes always reverted. Your workaround (duplicating the template) works precisely because the duplicate is no longer linked to the English source, so WPML has nothing to overwrite it with. A couple of quick questions: Is the duplicated French template currently stable on the live site? Has the category archive been displaying correctly since you applied the workaround, or have there been any further revert issues? Best regards, |
| April 27, 2026 at 5:38 am #17995720 | |
|
ahmedH-37 |
Strangely, the duplicated french template is working fine even if it's not attached to the english. Nothing has reverted and it's displaying perfectly. It's just weird though because in the backend it's not attached to the english page so i'm not sure i'm able to switch between the 2 pages. The same setup is not applied on the other woocommerce templates, one is set to all products and the other is set to products archive, therefor, there are no pages that are selected and the problem seems to come from that specific field. |
| April 27, 2026 at 1:56 pm #17997224 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Good news — we identified and confirmed the root cause. Here's what to do on your live site: The fix (2 steps): Step 1 — WPML Custom Fields Translation settings Go to WPML → Settings → Custom Fields Translation. Enable "Show system fields" to reveal the Kadence fields, then find these three and set them all to "Don't translate / Do nothing": _kad_wootemplate_show_conditionals Step 2 — Fix the original French template Go to Appearance → Kadence → WooCommerce Templates and open the French template "Modèle d'archive de catégorie" (the one linked to the English version, not the duplicate). In the Display Conditions panel, remove the English categories and re-select the correct French ones: Solutions d'endoscopie Why this happened: WPML was configured to copy _kad_wootemplate_show_conditionals verbatim from the English template to the French translation on every save — including the English term IDs. Since Kadence doesn't declare this field in its WPML configuration, WPML defaulted to treating it as a "copy" field. Setting it to "Do nothing" tells WPML to leave each language's version independent. Let us know if you run into anything. Best regards, |
| April 28, 2026 at 12:02 pm #17999638 | |
|
ahmedH-37 |
I did your steps and then trashed the copy, but now i'm just not seeing the archive template at all |
| April 28, 2026 at 7:04 pm #18000981 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Thank you for the update. I checked this further. The template settings are correct now, but after removing the duplicated French template, Kadence/WooCommerce may need the original translated template and query index to be refreshed. Please try these steps on the live site: 1. Go to Appearance → Kadence → WooCommerce Templates. The issue is that Kadence’s internal query/filter index was incomplete after the template changes, so the archive/grid was not picking up the correct French product/category data. After the reindex finishes, the French archive should display correctly again. Best regards, |
| April 29, 2026 at 10:38 am #18002379 | |
|
ahmedH-37 |
I just tried these steps and as soon as i set the french template COPY to draft, even though i repeateds the steps a second time, the archive is still not appearing. i reput the draft to published for now |
| April 29, 2026 at 10:41 am #18002397 | |
|
ahmedH-37 |
After doing your steps, now, in the EN product archive page, if I click on a filter, the products all disappear, but in the FR product archive page, it now works. This is related to my other ticket that I opened yesterday. |
| April 29, 2026 at 9:17 pm #18004105 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Thank you for the continued updates and your patience — they've been really helpful in narrowing this down. We've been investigating both issues in parallel and we've now identified the exact root causes for both. This is actually good news: we know precisely what to fix rather than having to try further workarounds. What we found Two separate bugs are at play, and they happen to affect opposite languages — which is why fixing one appeared to break the other. Bug 1 — Original French archive template never shows on its own The original French template "Modèle d'archive de catégorie" has an internal language flag (_kad_wootemplate_language) that was incorrectly set to en instead of fr. Kadence checks this flag on every page load and silently skips any template whose stored language doesn't match the current page. This is why the original FR template was invisible to FR pages, and why the duplicate you created worked — the duplicate didn't carry that wrong flag. Bug 2 — Clicking a filter on the EN archive removes all products Kadence maintains an internal filter index that maps products to their categories. The problem is that this indexer doesn't switch WPML language context per product when it runs. So whichever admin language was active the last time Force Reindex was pressed, only those products end up in the index. Running it in FR → only FR products indexed. Running it in EN → only EN products indexed. This is why the two languages kept breaking each other. The fix — 3 steps Step 1 — Add the compatibility snippet Add the following code to your child theme's functions.php, or paste it into a snippet plugin like WPCode or Code Snippets. This patches Kadence's indexer so that a single Force Reindex captures products of all languages at once, permanently.
/**
* Kadence WPML Query Index Compatibility
* Ensures Force Reindex captures products of ALL languages in one pass.
*/
add_filter( 'kadence_blocks_pro_query_index_args', 'batrik_kadence_wpml_index_args', 10, 1 );
function batrik_kadence_wpml_index_args( $args ) {
if ( ! function_exists( 'icl_object_id' ) ) {
return $args;
}
$args['_batrik_prev_lang'] = apply_filters( 'wpml_current_language', null );
do_action( 'wpml_switch_language', 'all' );
return $args;
}
add_filter( 'kadence_blocks_pro_query_index_object', 'batrik_kadence_wpml_query_index_object', 10, 3 );
function batrik_kadence_wpml_query_index_object( $rows, $object_id, $facet ) {
if ( ! empty( $rows ) || empty( $facet['source'] ) || empty( $facet['taxonomy'] ) ) {
return $rows;
}
if ( 0 !== strpos( $facet['source'], 'taxonomy' ) || ! function_exists( 'icl_object_id' ) ) {
return $rows;
}
if ( ! get_post_type( $object_id ) ) {
return $rows;
}
return batrik_kadence_wpml_get_taxonomy_rows( $object_id, $facet );
}
function batrik_kadence_wpml_get_taxonomy_rows( $object_id, $facet ) {
$added = array();
$rows = array();
$query_args = array(
'object_ids' => $object_id,
'taxonomy' => $facet['taxonomy'],
'include' => array_map( 'intval', (array) ( $facet['include'] ?? array() ) ),
'exclude' => array_map( 'intval', (array) ( $facet['exclude'] ?? array() ) ),
'parent' => ! empty( $facet['parent'] ) ? (int) $facet['parent'] : '',
'wpml_skip_filters' => true,
'lang' => '',
);
$terms = (array) ( new WP_Term_Query( $query_args ) )->terms;
foreach ( $terms as $term ) {
if ( isset( $added[ $term->term_id ] ) || $term->term_id === $query_args['parent'] ) {
continue;
}
if ( $term->parent === $query_args['parent'] ) {
$term->parent = 0;
}
if (
in_array( $term->term_id, $query_args['include'], true ) &&
! in_array( $term->parent, $query_args['include'], true )
) {
$term->parent = 0;
}
$rows[] = array(
'facet_value' => $term->slug,
'facet_name' => $term->name,
'facet_id' => $term->term_id,
'facet_parent' => $term->parent,
'facet_order' => $term->term_order,
);
$added[ $term->term_id ] = true;
}
return $rows;
}
Step 2 — Fix the language flag on the original French template In phpMyAdmin, run the following query (your table prefix is rws_): UPDATE rws_postmeta SET meta_value = 'fr' WHERE post_id = 25900 AND meta_key = '_kad_wootemplate_language'; Step 3 — Rebuild the filter index After these steps - The original French archive template will display correctly on FR pages Please let us know how it goes. Best regards, |
| April 30, 2026 at 10:20 am #18005206 | |
|
ahmedH-37 |
All three steps are now done Loading the EN Sterile Processing page with a subcategory filter directly in the URL now shows the correct English products. The dynamic sidebar filter click is still returning empty though, so unfortunately this didn't solve the issue. |
| April 30, 2026 at 9:11 pm #18007021 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hello, Thank you for confirming and for your continued patience — it's genuinely appreciated. The URL-based filter working correctly is a good sign that the index is rebuilding properly. The dynamic sidebar click returning empty points to a separate layer of the filter interaction, and I want to make sure I give you an accurate fix rather than another round of trial and error. I'm going to need a bit more time to investigate this specific behavior. I'll follow up as soon as I have something concrete. Best regards, |
| May 4, 2026 at 1:31 pm #18010986 | |
|
Claudio Palacios Supporter Languages: English (English ) Timezone: America/La_Paz (GMT-04:00) |
Hi, I’ve been doing a quick follow-up check on this from my side, and things seem to be behaving correctly now — including the sidebar filters on the EN archive. Could you please confirm if everything is working as expected on your end as well? I just want to make sure we’re fully aligned before closing this out, or if there’s anything still inconsistent that I should take another look at. Best regards, |
| May 5, 2026 at 5:38 am #18012167 | |
|
ahmedH-37 |
Hi Claudio, yes, we fixed it. Thank you. |
