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.
Our next available supporter will start replying to tickets in about 4.30 hours from now. Thank you for your understanding.
Tagged: Exception
This topic contains 14 replies, has 2 voices.
Last updated by Prosenjit Barman 1 year, 6 months ago.
Assisted by: Prosenjit Barman.
Author | Posts |
---|---|
April 4, 2023 at 1:19 pm #13400343 | |
arnoP-3 |
Hi, I'm editing pages that are translated from English to German. The translator did not translate the links yet, so that's what I am doing. However, my German link (see attached) is ignored in the frontend. It keeps showing the English link. But if I change a translated text, I can immediately see that in the frontend as expected. What could cause this? Kind regards, |
April 5, 2023 at 6:15 am #13406229 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, Sometimes due to caching, the links may not adjust properly in the translated content. Would you please try clearing the caches from your site and browser as well? If that doesn't solve the issue, then you need to Scan and adjust the links using the Link Target tool of WPML. Please follow the steps mentioned below- - Navigate to "WPML > Settings" and scroll down to the "Translate Link Targets" section. The pages and posts will be scanned and the links will be adjusted accordingly if the translations are available. Let me know if that helps or if you need further assistance in this matter. I will be happy to assist you. Best Regards, |
April 5, 2023 at 8:05 am #13407229 | |
arnoP-3 |
Hi Prosenjit, Thanks for the suggestions. It's not caching, because if I change a normal text I can see that immediately. I went to the settings, where it said "There is new translated content on this site. You can scan posts and strings to adjust links to point to translated content". I then ran the scan and it resulted in this: "All posts and strings have been processed. 0 links were changed to point to the translated content." I took a closer look at the links. Here's a detailed example: So, that's the English slug (/link/db-contact/) but with a German prefix (/de). A link like that doesn't even exist in our site. It seems like WPML ignores my translation and is generating a random link. Do you think it's a bug? Kind regards, |
April 6, 2023 at 10:06 am #13418635 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello Arno, If the issue can be replicated in a fresh installation, it would be considered as a bug. However, in your case, it appears to be more of a configuration error. Can you please check what happens if you keep the other plugins disabled except for the WPML and its add-ons? If that solves the issue, then start activating the plugins one by one and continue checking the issue till you’re able to find any plugin that is causing the issue. It is recommended to take a backup of the entire site before performing this action Let me know the update. I will be happy to assist youiIf you need further assistance in this matter. Best Regards, |
April 7, 2023 at 11:52 am #13426963 | |
arnoP-3 |
Hi Prosenjit, I did some testing on a staging copy of the site. The issue only happens with links created with the Thirsty Affiliates plugin. I disabled all plugins, including the Pro version of Thirsty Affiliates, and excluding WPML and the free version of Thirsty Affiliates. The problem then still occurred. If I deactivate Thirsty Affiliates, the link is not displayed at all. I checked the HTML in the WordPress editor, and these links are marked with a "ta" (Thirsty Affiliates) tag instead of an "a" tag. For example: When the page is rendered, it is converted to a normal "a" tag. If I manually change "ta" to "a" in the editor, the translated link is fine. If I leave it as "ta", somehow the translated link gets ignored, and I end up with the English link but with "/de/" inserted. I'm not sure which plugin is causing this. Thirsty Affiliates should not be involved in the translation process at all. I don't think it's aware of languages, so I can't think of a reason why it would do this. Could WPML be confused by the "ta" tag? My guess is when WPML is involved during page rendering, "ta" is not replaced by "a" yet, and WPML does not know what to do with it. Perhaps it can't match that tag and its content to the translated content. Then it sticks with the original English URL and inserts "/de/"? Kind regards, |
April 8, 2023 at 6:46 am #13430869 | |
arnoP-3 |
Follow up: I did one more test and pasted the link into the page like a regular link, and not via the Thirsty Affiliates insert function. This means that an "a" tag is inserted into the page instead of a "ta" tag that later gets transformed into an "a" tag. This time the translated link was fine. So, that confirms that the "ta" tag somehow causes the issue. Which is strange, because the link itself (URL) is in there and is no different than the link in the "a" tag. |
April 10, 2023 at 8:19 am #13436351 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello There, I truly appreciate your effort in figuring out the root cause and sharing the details with us. 🙂 Please be informed that the "ta" tag is not a conventional HTML tag. It is added by the "ThirstyAffiliates" plugin. If proper support for WPML is added within the plugin, then the WPML plugin can process and translate the contents as per your needs. Maybe the ThirstyAffiliate authority hasn't added the required support for the "ta" tag within their plugin and therefore, the WPML plugin can't process the translation properly. As the anchor tag("<a>") is a conventional HTML tag, WPML can easily process the translation and for that reason, you can see the translated link properly in the Frontend. However, I checked the compatible plugin directory of WPML and found that the ThirstyAffiliate plugin is not yet listed as compatible in the directory. You can check the link below for more understanding. Now, if you want to translate the contents within the "ta" tag and display the translation in the front end, you need to register that tag for translation by writing a few lines of code. However, the ThirstyAffiliate authority has mentioned that support for WPML is available within the PRO version of the plugin. Instead of taking the custom approach, will you please consult with them and see if they have any suggestions in this matter? I hope you'll get some useful suggestions from them. You can also request them to join the Go Global Program of WPML if they haven't joined yet. They can get support from the Compatibility and Developer team of WPML to make their plugin multilingual. More information about the Go Global Program is available here- https://wpml.org/documentation/support/go-global-program/ Let me know if you need any further assistance. We will be happy to assist you. Best Regards, |
April 10, 2023 at 12:08 pm #13437133 | |
arnoP-3 |
Hi Prosenjit, Thank you. I will contact them. It would indeed be best if they can add support. Both WPML and ThirstyAffiliates are widely used plugins. I can't imagine I'm the first customer running into this issue. It sounds like it isn't overly complex for them to make sure the <ta> tag is recognized by WPML. You wrote: "you need to register that tag for translation by writing a few lines of code". It's good to know that a workaround is available. Did you mean the Custom XML Configuration under WPML Settings? I have used that to add WPML support for custom shortcodes. Can I use it for the <ta> tag too, at least as a temporary solution? Kind regards, |
April 11, 2023 at 7:12 am #13442201 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi Arno, You're right. We haven't received such reports yet. As support for WPML needs to be added within the code, developer involvement is highly required. I hope they will add the required support for their custom tags so that the WPML can recognize them and process them accordingly. For now, I'm very sorry to inform you that we don't have any documentation right now on registering the custom tags. A thorough inspection is required to figure out a workaround. I'm requesting you try to reproduce the same issue on the sandbox site mentioned below. - hidden link If you're able to reproduce the issue there, I will forward this matter to the 2nd tier team for further investigation. Let me know the update. We will be glad to help you. Best Regards, |
April 14, 2023 at 4:55 am #13470461 | |
arnoP-3 |
Hi Prosenjit, I just wanted to let you know that ThristyAffiliates is still looking into this. Their last update was "It looks like WPML changes the site's home_url when using another language, so that might be what's causing the issue here." But I expect another update from them. Thanks, |
April 17, 2023 at 8:14 am #13484949 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello Arno, Thanks for the updates. Based on the Language URL format configuration(https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/), the home URL may get changed while switching to different languages which are normal. But, if you think that it can cause the issue, then kindly try to reproduce the same issue in the Sandbox site that I have shared in my previous response. Just let me know on which page or post the issue is visible. I will take a look and let you know what to do next. Feel free to share the updates you received from them as well. Best Regards, |
April 19, 2023 at 8:45 am #13503107 | |
arnoP-3 |
Hi Prosenjit, I agree, that's normal behavior. I'm still waiting for a response from ThirstyAffiliates. I feel that if they have implemented WPML support for their <ta> tag, this problem should not occur. But I have no confirmation yet if that support is built-in. Will keep you posted. Arno |
April 20, 2023 at 3:37 am #13508583 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hi Arno, Thanks for sharing the updates. I hope they will come up with a suitable solution. Just to let you know, the Sandbox I shared with you is still active. Feel free to attempt replicating the issue in the Sandbox. So that our 2nd tier team could investigate and determine if any action needs to be taken from our end. I look forward to hearing about the updates. Have a great day ahead! Best Regards, |
April 26, 2023 at 7:10 am #13538269 | |
arnoP-3 |
Hi Prosenjit, It appears that ThirstyAffiliates Pro does not have WPML support for the <ta> tag yet. They will fix that in the coming weeks. That should solve this, don't you think? Thanks, |
April 27, 2023 at 11:04 am #13548945 | |
Prosenjit Barman Supporter
Languages: English (English ) Timezone: Asia/Dhaka (GMT+06:00) |
Hello Arno, Thanks for the update. Indeed, the required support for WPML needs to be added for their custom tags. If the plugin team has given you assurance regarding this matter, then we need to wait for them till they release the solution. Till then, you can continue to use the conventional anchor tag(<a>) which worked for you. Let me know if there is anything else I can help you with. I will be happy to assist you. Best Regards, |