Skip to content Skip to sidebar

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, 6 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
January 22, 2024 at 8:47 am #15209860

botiss-biomaterialsG

Oki Thank you let me check that. Last week I was sick and I have been working from today. Let me fix an error on the staging website

January 22, 2024 at 9:36 am #15210130

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Sure, please take your time.

January 30, 2024 at 3:27 pm #15245117

botiss-biomaterialsG

I fix the error syntax on the website staging.botiss.com. This website is working again.

However, we have created a new website as shop.botiss.com for selling our products. I have also tested this bug in SHOP. As result, the link on SHOP is working without problem. You can see the link here: hidden link

Then I compare the configs between two websites. But, It is unfortunately that I can find what is a problem.

I also saw the link of this page in the database system. The link looks good still with /de/

I think the issue could be the config "Translate Link Targets" in WPML / Setting.
On Shop.botiss.com : I did NOT click the button "Scan now and adjust link".

on Staging.botiss.com: We have clicked this button before .

do you need a credential in the website shop.botiss. com in oder to look the configs of WPML there ?

could you have a look for this company in Berlin ?

Thanks

Screenshot 2024-01-30 at 16.26.46.png
January 31, 2024 at 6:53 am #15247363

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

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

Thank you for the updates.

On staging site, as I mentioned, that downloads page may have been corrupted. Because the ones I created anew, worked fine (see my previous message https://wpml.org/forums/topic/on-the-frontend-the-button-shows-only-link-of-english/#post-15199505). So probably if you delete the existing page (including its translations and from trash as well).

Check this guide about how to delete the translation of a page properly https://wpml.org/faq/how-to-delete-the-translation-of-a-page/.