Skip Navigation

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

Problem:
The client has an issue where a button on the English version of their site, which should link to the German version, only shows the English URL.

Solution:
We recommend the following steps:
- Add the following code to the theme's functions.php file:

add_filter( 'wpml_sl_blacklist_requests', 'wpml_sl_blacklist_requests', 10, 2 );

function wpml_sl_blacklist_requests( $blacklist, $sitepress ) {
    $blacklist[] = 'downloads';

    return $blacklist;
}

Adjust the $blacklist array as per the slug(s) of your pages/posts.

- If the issue persists on the said page, it may be due to corrupted entries. We advise deleting the page (including from Trash) and recreating it, along with its translations.

For more information on linking to pages in a different language, please refer to our guide: Linking to pages in a different language.
Additionally, if you need to delete a translation of a page, follow this guide: How to delete the translation of a page.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues at WPML known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket for further assistance: 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 17 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 4 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
January 4, 2024 at 10:22 am

botiss-biomaterialsG

we have a problem with url . we have a button on English Version and this button has a link to German Version but on the frontend the button shows only link of ENGlish
hidden link
the button "deutschsprachige Downloads"

January 4, 2024 at 11:17 am
January 5, 2024 at 5:13 am #15153207

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for your patience and cooperation. I am working on it to find a solution and 'll get back to you soon about the progress.

Regards.

January 5, 2024 at 11:13 am #15154076

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience.

I tried to reproduce the issue on my sandbox site (fresh installation), but can't reproduce it. And here it seems to work just fine:

- hidden link
- hidden link

I tried 2 different approaches for the link:

- Used full qualified link like hidden link
- and used a relative link /de/de-test-wpml/

and both seems to work fine.

Can you use this link to login to the sandbox site hidden link and try reproducing the issue please? So we can ensure if I haven't missed anything or is it only happening in your site.

Please let me know with exact steps if you're able to reproduce the issue.

January 12, 2024 at 10:55 am #15178444

botiss-biomaterialsG

Hi,

Your sanbox is working definitely because you do not use page builder. For our website, we have been using AVADA Page builder and in the page download we have a link with the shortcode of Avada fusion_button and atributte link. We do not translate this link while using your Advance translate. But I think, your plugin has translated automatically the url to the actually language. Therefore, our internal link were changed auto.

I tried to use custom config via xml file but not success.

could you have a look ?

here is our shortcode

[fusion_button target="_blank" color="default" linear_angle="180" stretch="default" icon_position="left" icon_divider="no" hover_transition="none" animation_direction="left" animation_speed="0.3" animation_delay="0" hide_on_mobile="small-visibility,medium-visibility,large-visibility" sticky_display="normal,sticky"
link="hidden link"
alignment="center" icon="fusion-prefix-icon-botissregularbotiss-arrowright"]deutschsprachige Downloads[/fusion_button]

Here is our tried config xml:
<wpml-config>
<shortcodes>
<shortcode>
<tag>fusion_button</tag>
<attributes>
<attribute>link</attribute>
<attribute type="link">link</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

- In the wpml / string translatinon I fould this button but I can not edit it.

- should we send you avada page builder for the testing ? and then you can see the problem.

Thanks

Screenshot 2024-01-12 at 11.12.03.png
January 12, 2024 at 12:59 pm #15179152

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

I'll check again in your staging site and 'll get back to you accordingly (on Monday probably).

January 15, 2024 at 6:02 am #15183036

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and apologies for the delay due to the weekend. I am working on it and 'll get back to you accordingly.

January 15, 2024 at 11:02 am #15184408

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I tried a few more options in your staging site, without any luck.

I've downloaded Avada theme and builder from your site and 'll try in my sandbox site and 'll get back to you accordingly.

Thank you for your patience and cooperation.

January 15, 2024 at 11:18 am #15184537

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I've tried in my sandbox with Avada theme and builder:

- hidden link -> button links to German translation of another page.

- hidden link -> button links to the German translation of this (own) page.

As you can see that I am able to link to other translated pages, even both of the above mentioned have been translated as well.

Can you please check in the sandbox site and try to reproduce the issue, like you've in your site?

January 15, 2024 at 1:24 pm #15185417

botiss-biomaterialsG

Can you export the settings of WPML from the website staging.botiss.com to the sanbox website to test this bug for our company.

I search the option export import in the WPML Plugin but I dont find this.

I remmer that before we translated the page from English to German with Worpdress Editor. And then we expand more languages as ES, IT, FR.

I think that could be a conflict between your translator and wordpress editor.

I was in WPML / String translation and saw the shortcode that the shortcode was not translated in German Version. Pls see the screenshort

Screenshot 2024-01-15 at 14.05.00.png
January 16, 2024 at 4:03 am #15187623

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure, 'll try that. However, sandbox do not support importing.

However, is this OK, if I remove unnecessary plugins, themes and media from your staging site and export a site package (using Duplicator or All-in-one-migration plugins)? So I can then investigate it locally and can send to our 2nd tier for investigation.

I believe there's something wrong in the DB (perhaps configs or corrupted data), that's why it is only reproduced in your site.

Please let me know.

January 16, 2024 at 12:20 pm #15189654

botiss-biomaterialsG

Yes Please,
The staging.botiss.com is a staging website.

BUT, botiss.com is live site , pls do not remove this website otherwise I got Problem with my company.

Thanks

January 16, 2024 at 3:13 pm #15190896

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for confirming. I'll only copy staging site and nothing 'll be removed in staging as well.

I don't have access to the live site, so no worries 🙂

I'll update you on the progress accordingly.

January 17, 2024 at 7:14 am #15192790

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I removed unused plugins, themes and media (docs, videos, audios and unattached) from the staging site. Then tried to create a package but due to Kinsta restrictions, I can only use Duplicator. However, this ones also breaks due to server interruptions - thus not being able to create a backup.

Can you create a fresh backup of the staging site from your hosting panel? Please consider followings:

- There are thousands of images in Media which we don't use, try to delete theme from staging.
- Take a backup.
- Upload to somewhere safe and provide the link to download.
- I've enabled your next reply as private to provide the link and/or backup files safely.

Meanwhile I've escalated the issue to our 2nd tier team but since we're not able to reproduce the issue in the sandbox, it is much important to have a copy of your staging site.

Please let me know.

January 18, 2024 at 11:44 am #15199505

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

Team suggested a workaround, which seems to work on your staging site, with some exception. Let me explain in detail:

- I switched to Avada parent theme because this doesn't work with the child theme:
- Added following code to theme's functions.php file:

function wpml_sl_blacklist_requests( $blacklist, $sitepress ) {
    $blacklist[] = 'test-wpml-18-jan';
	$blacklist[] = 'downloads';
    return $blacklist;
}

- I had already created this page using Avada Builder: hidden link

So if you check, the button link refers to its German version hidden link.

While on Downloads page (hidden link) it doesn't work.

So here are the exceptions:

- Child theme contains several custom code which may be conflicting with this. So you should probably check that, because fixing custom code is out of scope of this forum.

- For the Downloads page, perhaps that page has some corrupted entries. I'll advise to delete the page (from Trash also) and recreate it.

The above mentioned solution is mentioned in this guide https://wpml.org/documentation/getting-started-guide/sticky-links/#linking-to-pages-in-a-different-language. You don't need WPML Sticky Links to make it work.