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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Tagged: Custom Work
This topic contains 7 replies, has 0 voices.
Last updated by Long Nguyen 6 hours, 29 minutes ago.
Assisted by: Long Nguyen.
Author | Posts |
---|---|
October 29, 2024 at 9:09 am #16340800 | |
Ahliman maelT |
Background of the issue: Symptoms: Questions: |
October 29, 2024 at 9:47 am #16341095 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Here is the forum ticket. I would like to request temporary access (wp-admin and FTP) to your site so I can take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info. ❌ IMPORTANT: Please backup your database and website before proceeding ❌ Looking forward to your reply. |
October 29, 2024 at 9:48 am #16341096 | |
Ahliman maelT |
I was typing to add credentials to access to my website, but Long Nguyen transformed the chat to the forum ticket without my confirmation |
October 29, 2024 at 10:35 am #16341391 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, I would like to request temporary access (wp-admin and FTP) to your site so I can take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info. ❌ IMPORTANT: Please backup your database and website before proceeding ❌ Looking forward to your reply. |
October 29, 2024 at 12:36 pm #16342166 | |
Ahliman maelT |
Ok I found the problem, it is a "bug" for me. If some one technical can answer it will be perfect The problem comes from "get_the_permalink" function and "wpml_permalink" filter. The "get_the_permalink" will return the product in the current language "en-us" If the product in "en-us" is in Draft mode, it will return the preview URL and the filter "wpml_permalink" will just replace the language so we will get the preview URL. The "wpml_permalink" must detect if the url is a preview URL, if yes, it should return the correct value for the translation, or we should get the ability to edit it with a parameter |
October 30, 2024 at 2:56 am #16344577 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, I've tried to replicate the issue on a clean WordPress installation and confirmed the issue. This happens when the option auto adjust ID is enabled, you can go to WPML > Languages > Disable option "Adjust IDs for multilingual functionality" and recheck this. Please check the attached screenshot and the sample code below: $permalink = get_the_permalink( 100 ); // 100 is the translation post ID echo "Permalink: " . $permalink; echo "<br>"; $wpml_permalink = apply_filters( 'wpml_permalink', $permalink, 'fr' ); echo "WPML Permalink: " . $wpml_permalink; If you want to test, please click this link hidden link Looking forward to your reply. |
November 4, 2024 at 8:12 am #16359072 | |
Ahliman maelT |
Hi Long Nguyen, Thanks, it looks working but let me some days to check the website globally to see this settings impact, I will come back here to give news |
November 4, 2024 at 8:46 am #16359355 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
I'm waiting for your feedback. Thanks. |
November 12, 2024 at 4:26 pm #16393858 | |
Ahliman maelT |
Hi, After checking it internally with our team, disabling this option causes some issues, I will back soon to provide more information, I am waiting an answer from some people |
November 14, 2024 at 1:25 am #16400359 | |
Long Nguyen Supporter
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Sure, let me know if you have any questions. Thanks. |