Background of the issue:
I was trying to translate a website page using WPML. Translated pages do not work correctly, although editing old translated pages works fine. When creating a translation using WPML, the translation does not become visible, and changing the language redirects to the main page. Using the WordPress translation editor results in an error. The issue can be seen at hidden link. I expected to see text identical to hidden link.
Symptoms:
Deprecated: urlencode(): Passing null to parameter #1 ($string) of type string is deprecated in /data/wordpress/wp-content/plugins/wp-seo-multilingual/classes/class-wpml-wpseo-filters.php on line 131.
Questions:
Why do translated pages not become visible when using WPML?
Why does changing the language redirect to the main page?
What causes the error when using the WordPress translation editor?
The error you sent is a warning about some functions' usage from WPML, which will be unavailable in the future. This has no impact on the website's functioning; it is just a warning for developers.
About the layout and translation issue of the page, can you please elaborate on how the original content was created? Did you use a builder? Does it have custom fields? And also about how it was translated. Did you use automatic or manual translation? Did you use the Advanced Translation Editor?
Please note that we don't provide support for custom work within this forum.
I will, however, try to point you in the correct direction.
If my suggestions are not enough, we suggest contacting one of our 3rd party contractors that specialize in custom work with WPML: https://wpml.org/contractors/
To be able to investigate the problem, we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below: hidden link
Kindly follow the steps below:
- Don't restore your site there.
- Install your theme and only the necessary plugins to reproduce the problem
- Try to replicate the issue with minimal steps.
- Then let me know, and I'll take a look
Don't know how or why, but after I returned work from long weekend (was not working on Friday-Sunday), the translations now just work again. Of course it would be nice to know why but it is not required, so this issue as it is is now resolved.