This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing a 404 error on the Portuguese homepage of their website after translation. Additionally, the header and footer were not visible on the translated pages.
Solution: 1. We identified a plugin conflict causing an infinite redirect and disabled the 'Redirect 404 to Homepage' plugin to resolve the initial access issue. 2. We discovered that the 'Edibbee' page, set as the front page, lacked translations in Portuguese and Spanish. We recommended translating this page to resolve the 404 errors. 3. For the URL structure, the language code 'pt-pt' is used as it is set in WPML -> Languages -> Edit Languages. We suggested creating a custom language for a different URL code if desired. 4. We addressed template translation issues by directing the client to https://wpml.org/documentation/plugins-compatibility/elementor/#translating-elementor-templates for guidance on translating Elementor templates. 5. We increased the WordPress memory limit from 40MB to match the PHP memory limit of 2GB, which resolved issues with saving translations.
If this solution does not apply to your situation, or if it seems outdated, we recommend opening a new support ticket. We also advise 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. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
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.
Tell us what you are trying to do?
I am translating my site to other languages. The PT homepage gives error hidden link. How can this be fixed. And want to confrirm 1 thing, if I translate it to other language the link should be [website name].com/pt or [website name].com/pt-pt?
Which one is correct?
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hi,
Thanks for contacting us.
Can you please test minimal, using a default theme(if applicable) and with all non-WPML and essentials plugins disabled to see if the error persists. If possible make a backup of the site before doing it or test on a staging copy.
Also, so that we can take a better look at this, could you please attach the Debug info?
In summary, these are the steps that you need to take in order to retrieve it:
- Go to WPML > Support > Debug Information
- Copy the Debug Information from there.
- Find the “Additional Data” section below this chat.
- Click on the “Debug Info” item to expand it.
I'm enabling the Debug Info template for your next reply.
Looking forward to helping you resolve this issue.
FYI I cannot take backup or there isn't any beta site. We have to do the changes here only. Please let me know if the debug information helps provide the solution.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello,
Thank you for sharing the debug info.
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
Thank you for sharing the access to the site. I'll try to address your concerns, please let me know if I miss something.
1) The home page in Portuguese and Spanish was getting an infinite redirect due to a conflict with a plugin 'Redirect 404 to Homepage'. After I disable it, both languages are showing a 404 not found error.
2) The 404 not found error is happening because the page that is set up as the front page as the moment: 'Edibbee' doesn't have a translation. You can translate it to Portuguese and Spanish and it should start working properly.
3) Regarding the language in the URL, it will show up as pt-pt because it is the language code set up in WPML -> Languages -> Edit Languages. For default languages, you can't change it. But if you want to use a different language code(it is where WPML gets the info to display in the URL) you could create a custom language and set the desired language code and flag for example.
1. But the PT homepage is already translated so idealy it should not give 404 error. And only 8 Pages are shown in Portuguese but the rest of the pages are also translated then it should show but it is not showing.
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
I checked it and it looks like the current page set as the home page has the 'add translation' icon available, indicating that it might be missing a translation, please check the screenshot.
Regarding the templates, I found them to be at the post type 'footer' and 'header' respectively, please give it a try. You can filter by all post types and search for header and footer.
Alternatively you can try clicking on the following links directly and adding the translation from there by click on the + icon at the right bar:
Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hello there,
I checked it and I noticed that your WordPress memory limit was set to 40MB while the PHP memory was defined as 2GB:
Debug info
PHP MemoryLimit 2048M
WP Memory Limit 40M
This was preventing the home page Portuguese translation from saving properly. The Spanish translation seems to be partially translated, it needs to reach 100% before you can save it, so it is a different issue.
I went ahead and updated the WP memory limit and tried to save the home page translation again and I can see it now(please check the screenshot):hidden link
Regarding the header, a similar issue was happening, by increasing the memory limit I was able to save the translation just fine and I can see it applied to the Portuguese pages.
I checked the footer but it is not 100% translated, can you please review it and finish translating it?
Once you translate the home page to Spanish(Portuguese is OK now) and the footer to Portuguese and Spanish, the rest should be covered by now.