This thread is resolved. Here is a description of the problem and solution.
Problem: You are working on a site under development and encountering issues with WPML. Specifically, you face an error when trying to translate link targets ('Error! Reload the page and try again'), and custom post URLs are not being translated. Solution: For the issue with translating link targets, we recommend enabling WordPress Debug by following this guide. After enabling, use the Link Target feature again and check the WordPress Debug log for any errors. Share these errors with us for further assistance.
Regarding the custom post URLs not being translated, ensure that the CPT slug has been registered correctly. For guidance on adding multilingual support for CPT slugs, refer to this documentation. If the problem persists, please provide the link to the page/post where the slug is not showing correctly.
Additionally, a '504' server error was identified, which suggests issues with the server or the Content Delivery Network (CDN). Contact your server support for this matter. As a temporary measure, deactivating all plugins except for WPML might help, as it did complete the process successfully in our test.
If these steps do not resolve your issues or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, do not hesitate to open a new support ticket for further assistance.
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.
Background of the issue:
I am working on a site under development and trying to use WPML to translate link targets and custom post URLs.
Symptoms:
1) Translate Link Targets, receiving the following error: Error! Reload the page and try again. 2) Custom post URLs are not being translated.
Questions:
How can I resolve the 'Error! Reload the page and try again' issue when translating link targets?
Why are custom post URLs not being translated?
Before this thread gets assigned to my colleague, I'd like to offer some initial guidance or potential solutions.
Issue with Translate Link Target: To better understand the root cause, please enable WordPress Debug(by following this guide) and then use the Link Target feature again. If an error occurs, check the WordPress Debug log, copy the latest error, and share it in your next response. This will help us better understand the issue and provide appropriate suggestions.
Issue with Translating CPT URLs: From the WPML Debug info, I noticed that the CPT slug has been translated for certain post types, such as market-solutions and software. If the CPT slug is still not showing as translated, please check to ensure the CPT slug has been registered correctly. You can refer to the following guide to understand the process of adding multilingual support for CPT slugs.
If the issue persists even after that, please share the link to the page/post where the slug is not showing correctly. We will check and suggest what to do next.
I enabled WordPress Debug, but the error didn't appear there. However, I did notice an nginx error in the website logs indicating a timeout or connection error:
upstream timed out (110: Connection timed out) while reading response header from upstream
I am unsure why the Translate Link Targets would timeout, especially since I just completed Media Translation for approximately 9000 images without any timeouts.
The CPTs have been created using Jetengine, ensuring compliance with the correct registration process for the CPT slugs. The actual pages have been translated, but the links to these pages are not being translated. For example, if you create a banner linking to a "market-solutions" page that link is not being translated.
Additionally, I've encountered another issue where the WPML language switcher stopped working on some Elementor template pages, such as this page. hidden link
I need to provide you with server login access to view these pages.
as we try to keep each ticket to one issue, let's first resolve the internal links error and then I will split the other 2 issues mentioned into their own threads for us to work on them.
Your time limit is at 2000 which should be more than plenty based on the error you are getting.
I do see that the PHP Version is at 8.3 which is not officially supported just yet, If possible switch back to 8.2 and let me know your results
Ok sure, I will open a new ticket for the WPML language switcher.
I tried changing the PHP Version to 8.2, this made no difference. I still get the same error. The Translate Link Targets was working, it has been working on 8.3. It just stopped working recently for some reason.
There are some errors in the Advanced Translation Editor Error Logs, but sure if these would be related?
These are most likely not related. Did you recently migrate the site to another hosting environment perhaps?
I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)
**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.
NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.
I identified a "504" server error during my investigation. A 504 error typically points to issues with the server or the Content Delivery Network (CDN) it utilizes.
I recommend contacting your server support to address this error and ask for their insights.
Additionally, I found that 18,585 strings are being processed, likely consuming significant server resources and may be causing the 504 error.
As a temporary solution, I deactivated all plugins (frees us resources) except for WPML and reran the action. Although it took about 30 minutes, the process was completed successfully with the message:
"All posts and strings have been processed. 21 links were changed to point to the translated content."