Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with translating the 'destinations' section in French using Elementor on your site, and the Spanish translations are working fine, the issue might be related to the 'Travel Management' plugin. Specifically, the shortcode nd_travel_destination_packages used in the Elementor template might be referencing an incorrect language ID for translated posts, causing it to display only the first destination.
Solution:
We recommend modifying the plugin's code as a temporary workaround. Please note, this plugin and the parent theme are not compatible with WPML, and any changes might be overwritten during plugin updates. Here are the steps:
1. Navigate to

wp-content\plugins\nd-travel\inc\metabox\mtb-cpt-3.php

and around line 164, replace:

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3' );

with:

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3', 'suppress_filters' => false );

2. Edit the translated destination in the admin panel, select the correct destination, and save.
Since this solution might become outdated or might not apply 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 the issue persists, please open a new support ticket.

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 19 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 10 months ago.

Assisted by: Nicolas V..

Author Posts
May 27, 2024 at 4:26 pm

davidS-40

The translation for the second language (french) in some area “destinations” is not working properly, the first language translation (spanish) is ok but the french is not translating conde.travel/fr/destinations cant translate using the elementor option.

May 27, 2024 at 6:38 pm #15675499

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

As discussed I would need to replicate your site on our servers so that our second tier support team can investigate further.

For this, you need to temporarily install a plugin called “Duplicator” on your site. This will allow you to create a copy of your site and your content.
I have activated a private field for you where you can share those files (package + installer).
- You MUST exclude /wp-content/uploads and /wp-content/cache from the copy to reduce the size
- Once the package is ready, if the files are too large to upload them to the private field, you can share a link to Google Drive, Dropbox, WeTransfer or any other similar service.

Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
https://wpml.org/faq/provide-supporters-copy-site/

May 28, 2024 at 12:33 pm #15678442

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you, I will install that copy on our servers and escalate the ticket to second tier support.

May 28, 2024 at 1:37 pm #15678925

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

Just to let you know that your ticket has been escalated to the second tier support. I'll get back to you as soon as I have some feedback.

Thanks for your patience.
Nico

May 28, 2024 at 6:01 pm #15680190

davidS-40

Hello Nicolas

Since yesterday I cant use the search form. When I search any tour keyword it shows me only 4 tours all the time the same tours but no results, could you tell me if you made other kind of changes related to this problem? I dont know what could be the problem now

May 29, 2024 at 1:27 pm #15684059

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

HI David,

Our team is still investigating. Actually your ticket got escalated to an higher level.

About the search, here is what we did during the conversation:
- Re-translate the "Destination single" template
- Delete all FR translations and redo 2 quick translations

Maybe your search form use some cache or index for performance, in that case re-index your content.

May 29, 2024 at 2:57 pm #15684596

davidS-40

Hi Nicolas and thanks for your reply, and yes the problem probably it was related to the cache.

Also I would like to know how long do I need to wait for the final answer, just to know please?

May 29, 2024 at 9:52 pm #15685476

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

I can't give you an ETA as the fatal comes from Elementor itself and not our plugin, but the fact that the error happens only on your secondary language could relate to WPML. So we need to investigate further. I'll keep you posted as soon as possible.

May 29, 2024 at 11:43 pm #15685568

davidS-40

Dear Nicolas thanks for your message

As you can see the problem is only with the secondary language so I dont understand why. Please Ill wait for the investigation results

June 3, 2024 at 11:31 am #15697622

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello David,

The problem is coming from "Travel Management" plugin. There is a shortcode nd_travel_destination_packages (Defined in wp-content\plugins\nd-travel\inc\shortcodes\nd_travel_static_shortcodes.php) used in the Elementor template.

It uses the parent destination ID which is set to destination post. However, this ID belongs to an incorrect language for translated posts. So shortcode displays the first destination.

Disclaimer: This plugin and the parent theme are not compatible with WPML.
1. The code provided below is a workaround and you will need to edit the plugin's code. Which means that every time you update the plugin your code will be overwritten and you will need to edit it again.
- We won't support this code in the future. We recommend you to contact the author and provide this solution, so they can implement it in their code.

2. We also recommend you to search for a compatible alternative here: hidden link

Workaround
- Edit wp-content\plugins\nd-travel\inc\metabox\mtb-cpt-3.php around line 164
replace:

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3' );

with

$nd_travel_destinations_args = array( 'posts_per_page' => -1, 'post_type'=> 'nd_travel_cpt_3', 'suppress_filters' => false );

- Then edit the translated destination (e.g. /wp-admin/post.php?post=20005&action=edit&lang=fr), select the right destination and save.

June 6, 2024 at 11:30 am #15710838

davidS-40

Hello Nicolas

my question is why is happening only in the second translation language? and everythin works fine with the spanish version

June 6, 2024 at 12:46 pm #15711058

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

I'm not sure to be honest. It could be related to the workflow used for Spanish? The way you translated in Spanish the page containing the shortcode or maybe you created another shortcode in Spanish or even modified the shortcode in the Spanish page using the WordPress editor?

Please let me know if the solution provided works fine.

PS: you can see here that it's a common compatibility issue here: https://wpml.org/documentation/support/debugging-theme-compatibility/#issue-wp_queryargs-or-get_postsargs-doesnt-filter-out-correct-posts-ids-for-the-current-language

June 10, 2024 at 1:55 pm #15722419

davidS-40

Hello Nicolas, I modify the file but the problem still continue.
cant edit new translation "Bolivia"

123.png
June 10, 2024 at 8:24 pm #15723964

Nicolas V.
WPML Supporter since 12/2021

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

I tried to log into your dashboard to see if I could reproduce the error but it requires a two step verification with a code. Could you please remove that protection while I'm working on your site?

June 11, 2024 at 2:04 pm #15727235

davidS-40

Nicolas I sent you the access yesterday