Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with changing languages smoothly on every page of their website. They have tried resetting WPML settings but the issue persists. The client suspects that the WPML plugin is not working smoothly with their WordPress.com hosting, as it only works with plain permalinks.

Solution:
We reviewed the client's site settings and identified that the REST API was not enabled, which could be causing issues with language switching. We provided the following steps:
1. Enable the REST API on the site.
2. Verify the REST API functionality by accessing

https://staging-1b92-ecogamesnet.wpcomstaging.com/id/wp-json/

and checking for a JSON response.
3. Make a small update on the default Contact page and then update the translation.
We also suggested that the client could refer to an article on how to enable the WordPress REST API (https://medium.com/@techreviewgarden/how-to-enable-wordpress-rest-api-754789a081f8) or contact their hosting provider for assistance.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If the issue persists, we highly recommend checking related known issues (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 you need further assistance, please open a new support ticket with us.

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.

This topic contains 11 replies, has 2 voices.

Last updated by dewic 1 year, 4 months ago.

Assisted by: Prosenjit Barman.

Author Posts
March 13, 2024 at 1:13 am #15401802

dewic

Tell us what you are trying to do?
changing language smoothly in every page.

What is the link to your site?
hidden link

pages.png
blog.png
Screenshot_1.png
March 13, 2024 at 6:48 am #15402152

dewic

I have reset and followed this: https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset

but nothing changed.

Multi-Language is only working on plain URL

March 13, 2024 at 8:41 am #15402491

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having. A 404 error on the translated page may appear due to the following reasons:

- Corrupted permalink structure
- Page/post is saved in draft
- The same slug is used more than once in one language.

Would you please do the following steps and check if that helps?

- Please ensure that the slug you've used for the posts/pages has not been used for any other post/page in the same language. As WordPress doesn't support identical slugs, it is required to use a unique slug for each post, page, and post type.
- Please go to "Settings > Permalinks" from your WordPress Dashboard
- Resave the structure without making any changes
- Now, switch to secondary language using the language switcher on topbar of the WordPress Dashboard
- Locate the page/post that shows a 404 error.
- Click on "Quick Edit" and make sure that the 'Status' is set to 'Published'.
- Clear the caches from the site and browser then check again.

Please let me know if the steps above help in solving the issue or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

March 13, 2024 at 11:49 pm #15406128

dewic

Hi Prosenjit,

Thank you for the response.
after doing some research and testing.

I think the WPML plugin is not working smoothly on our WordPress hosting. we host our site directly on WordPress.com. It only works with plain permalink.

This is a comparison coming to the other host provider

hidden link
user: demo
pass: demo1234

this is our staging in WordPress:
hidden link

both come from identical sites.

I can give you access administrator if you want to directly test.

Currently, I also ask WordPress.com support to troubleshoot this issue.

March 14, 2024 at 8:26 am #15408089

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

Please note that the WPML Plugin is designed to work independently of your hosting environment. Many users successfully run WPML on WordPress hosting platforms without encountering issues. If you're experiencing 404 or 'Not Found' errors on specific pages, this is likely related to a particular setting or configuration, rather than the hosting service itself.

However, I check both the sites you've shared and can see that the Indonesian version of the site is loading properly on both. Please check this screenshot(hidden link) for a better understanding.

Were you able to resolve the problem, or do you still require assistance? Don't hesitate to reach out if you need further support; I'm here to assist you.

Best regards,
Prosenjit

March 15, 2024 at 2:00 am #15412603

dewic

Hey,

It works for the homepage only.
Could you have a check the inside page,
ex: hidden link

March 15, 2024 at 6:19 am #15412724

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

I have checked the Indonesian version of the "Privacy Policy" page and noticed the issue. While checking the WPML Debug Info, I noticed that the WPML Sticky Links plugin is enabled. Would you please deactivate the plugin(as it is not required) and check again? If the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields 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.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called ā€œDuplicatorā€ or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup 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

Looking forward to your response.

Best Regards,
Prosenjit

March 19, 2024 at 3:30 am #15423917

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing the access information.

I've reviewed the site and noticed it is different from the one you previously shared (hidden link).

However, focusing on the Privacy Policy page where the issue occurred, I accessed the same page on the new site and switched to the Indonesian language. The Indonesian version of the page loaded successfully without any 404 errors on the new site.

I also checked other internal pages, even as a non-logged-in user but haven't encountered the 404 error after switching language. You can check this video(hidden link) I made during the investigation.

Since everything appears to be functioning correctly on the new site, have you resolved the problem? If you're still having issues on the pages I've shown in the video, try clearing your site and browser caches before checking again.

If you're having an issue on any particular page, please share the name/link of the page in the next response. I'll check and be happy to assist you further.

Looking forward to your response.

Best regards,
Prosenjit

March 19, 2024 at 9:53 pm #15428972

dewic

Hey, yeah, I’m coming with a staging environment copy from the LIVE site. It still has an issue when we use custom post permalinks. It only works with plain permalinks. What we want is for it to work with custom permalinks.

March 20, 2024 at 7:59 am #15429713

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the feedback.

If you can share access to the site where the issue is still happening, that would be great to investigate the issue further.

I enabled the private box for you so that you can securely share the access. Please also try to add the link to the page where the issue is visible.

I will check and try my best to address the issue. Looking forward to your response.

Best regards,
Prosenjit

March 21, 2024 at 5:32 am #15434282

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for sharing the access and information about the pages.

When I checked the WordPress setting on your site, I noticed that the REST API is currently not enabled. Please check this screenshot: hidden link

When I tried to access WP-JSON from the Indonesian language, I also encountered a page not found error. This configuration could be causing the issue with Certain Indonesian translations.

You can also check that by going to "WPML > Support" and scrolling down to the "WordPress" section. If you try to access hidden link, you should receive a JSON response, which is not happening in your case.

Could you please enable the REST API on your site and try again? If you're not sure about how you can enable it, you can check this article: hidden link

You can also reach out to the Hosting provider for assistance in enabling the REST API.

After enabling the REST, please make a small update on the default Contact page and then update the translation.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

March 22, 2024 at 2:26 am #15438612

dewic

Ok, I think this is another issue that needs to be resolved. the hosting has a different procedure to access the API. I cannot change that.

this is from Hosting CS.

hidden link

I decide using a plain permalink at this time.

thank you for your help.

March 22, 2024 at 2:29 am #15438613

dewic

The actual issue is not resolved, but I think it on the Hosting issue.