This thread is resolved. Here is a description of the problem and solution.
Problem:
Some parameters in URL weren't being missed when switching language (or visiting translation).
Solution:
If you are using "Language name added as a parameter" option and want to preserve other query string parameters across translations, make sure to turn on the following setting:
WPML -> Languages -> Language switcher options -> Preserve URL arguments
And add the parameters separated by a comma.
After adding just move out of that box, so it is saved automatically. Then reload the page in frontend and you can see the parameters added to the language switcher or the target URL.
Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/
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: Documentation request, Exception
This topic contains 10 replies, has 2 voices.
Last updated by Waqas Bin Hasan 1 year, 5 months ago.
Assisted by: Waqas Bin Hasan.
Author | Posts |
---|---|
July 14, 2023 at 12:28 am #14036911 | |
jorisS-3 |
I am trying to: Switch an event page to a different language (a recurring event type) Link to a page where the issue can be seen: hidden link I expected to see: hidden link Instead, I got: hidden link |
July 14, 2023 at 7:46 am #14037847 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, Thank you for contacting the support. Since you've checked an existing solution (on the other thread), I assume you would have tried all the basic debugging mentioned as well (i.e. trying with minimal setup and etc), right? Continuing further, I'll need more explanation on the issue for better understanding, like what are the exact steps you are trying from creating an event to translating and then modifying event and then updating translations? Secondly, I checked some background details on the other thread and found a recommendation like, only if this relates: > ...change the original date of the event before changing the repetition date to avoid this from happening. Besides this, I'll advise to fix WP Memory Limit by adding followings to your wp-config.php file: define( 'WP_MEMORY_LIMIT', '128M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' ); Remember to add these lines before the line where it says: WPML requires a memory limit of at least 128MB while 256MB is recommended. Please let me know and I'll try my best to further assist you on the matter. Regards. |
July 16, 2023 at 6:43 pm #14045353 | |
jorisS-3 |
Hi, Regards |
July 17, 2023 at 6:11 am #14045937 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the updates. Have you tried along these lines? > ...change the original date of the event before changing the repetition date to avoid this from happening. |
July 17, 2023 at 7:01 am #14046157 | |
jorisS-3 |
Sorry, the line in itself is not clear. What do you mean by original date? I couldn't find the reference to it in the support thread, unfortunately. In the support thread it says that I have to but a blank space in the content of the translation and save it again. Could you please elaborate in steps where exactly I have to change the date, and what does it mean by original date? The original date when it was created? Best Regards |
July 18, 2023 at 7:48 am #14055439 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
May I ask for admin access to your website to check the issue in detail? You can create a separate admin user for this purpose, which can be deleted afterwards. Also provide following detail to investigate/observe the issue detailed steps to reproduce the issue and links to pages in admin and on frontend. Remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site, which may cause conflicts with the live site otherwise. Please confirm it in your next reply or let me know if you do not agree with the mentioned. I've set your next reply as private to share this information safely. IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public. See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security. |
July 19, 2023 at 10:49 am #14065399 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the access, I am working on this and 'll get back to you as soon as I find something or have a solution. |
July 19, 2023 at 12:44 pm #14066149 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for waiting on this. I checked in the site and looks like a lot of plugins need an updated, including WPML's. As well as, the parent theme also needs an update. I tried to update WPML plugins but got an error, this happens due to mismatched sitekey. As I can see the error in hidden link also. Please register WPML by creating a new sitekey for your dev site, update WPML plugins, other plugins and theme. It'll be great if you can deactivate all other plugins and leave only the most required plugins for this (after updating everything). So I can then continue working on it. |
July 27, 2023 at 1:58 pm #14111317 | |
jorisS-3 |
You can please continue. Everything should be updated and some plugins not required are deactivated. Thanks! |
July 28, 2023 at 7:49 am #14115171 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for the details. I'll soon start working on it and 'll update you accordingly (perhaps on Monday). Have a great weekend. |
July 31, 2023 at 6:26 am #14124173 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Thank you for your patience and cooperation. I was able to check in detail and found that following setting in WPML needed to be used, in accordance of the URL parameters used in hidden link: WPML -> Languages -> Language switcher options -> Preserve URL arguments And add the "occurrence" and "time" parameters separated by a comma (see attached). After adding just move out of that box, so it is saved automatically. Then reload the above mentioned URL and you can see the parameters added to the language switcher (i.e. when you click the Dutch flag). See https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/preserve-url-arguments-when-switching-languages/ for more details. |
July 31, 2023 at 2:00 pm #14128013 | |
jorisS-3 |
Thanks Waqas for your support. I was able to solve it using your instructions. |