Skip to content Skip to sidebar

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

Problem:
The client reported a 500 error on their website after installing the WPML plugin. They also noted that their homepage and other pages were out of sync in the English version, and the Rest API was disabled without their intervention.
Solution:
We addressed the 500 error by suggesting the client enable the WP debug log to identify specific error messages. For instructions on enabling the WP debug log, we recommended visiting https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/.
Additionally, we resolved the issue by adding specific code to the

functions.php

file in the theme folder. The necessary code and instructions can be found at https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/.

If this solution does not resolve your issue, or if it 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 further assistance is needed, please open a new support ticket at WPML support forum.

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 6 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 10 months ago.

Assisted by: Long Nguyen.

Author Posts
May 22, 2024 at 5:01 pm #15659405
karimI-2

Hello,
I just bought the plugin, unfortunately I have several problems.

If I can't get it to work, I'll have to ask for a refund.
I hope you can help me, because I'd like to be able to translate my site into English.

As you can see from the images, I have a 500 error that I can't resolve.
In addition, my home page and other pages on my site are out of sync and display differently in the English version.

Finally, I checked my settings and it says that the Rest API is disabled. But I don't understand why, as I haven't activated any particular security.

Thanks in advance for your help,
PS: I made a mistake by creating a duplicate on the French forum
Please take this ticket into account

New threads created by Long Nguyen and linked to this one are listed below:

https://wpml.org/forums/topic/i-checked-my-settings-and-it-says-that-the-rest-api-is-disabled/

Capture d'écran 2024-05-22 182502.png
Capture d'écran 2024-05-22 182438.png
Capture d'écran 2024-05-22 182423.png
May 23, 2024 at 2:33 am #15660036

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Karim,

Thank you for contacting WPML support, I’m happy to help you with this issue.

We limit one issue per ticket only so I will split your other issues into new tickets for better handling. In this ticket, I will focus on the 500 error.

Please let me know where you see the error, in the admin area, frontend, or a specific page. You can enable WP debug log, revisit that page and check if there is an error message in the log file and share it with me.
If you don't know how to enable WP debug log, please follow the documentation
https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/

Looking forward to your reply.
Thanks

May 23, 2024 at 10:02 am #15661984

karimI-2

Hello,

This is what I see in my debug file

[22-May-2024 16:12:45 UTC] PHP Warning: Undefined array key 0 in /home/hido8236/public_html/wp-includes/class-wp-query.php on line 3643
[22-May-2024 16:37:41 UTC] PHP Warning: Undefined array key 0 in /home/hido8236/public_html/wp-includes/class-wp-query.php on line 3643
[22-May-2024 16:39:35 UTC] PHP Warning: Undefined array key 0 in /home/hido8236/public_html/wp-includes/class-wp-query.php on line 3643
[23-May-2024 08:22:15 UTC] PHP Warning: Undefined array key 0 in /home/hido8236/public_html/wp-includes/class-wp-query.php on line 3643
[23-May-2024 08:22:16 UTC] PHP Warning: Undefined array key 0 in /home/hido8236/public_html/wp-includes/class-wp-query.php on line 3643

The error occurs on my website, when I click on translated version pages

May 24, 2024 at 1:42 am #15665411

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Looking forward to your reply.
Thanks

May 24, 2024 at 10:03 am #15666893

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I fix the issue by applying the workaround in the documentation below: add the code to the file functions.php in the theme folder
https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

Please recheck this and let me know how it goes.

May 24, 2024 at 10:09 am #15666976
karimI-2

Thank you, the error 500 has been resolved.

But as mentioned in my first message, why are the home page and other pages offset when I go to the English version?
There's a problem with the layout of the blocks.

New threads created by Long Nguyen and linked to this one are listed below:

https://wpml.org/forums/topic/why-are-the-home-page-and-other-pages-offset-when-i-go-to-the-english-version/

May 27, 2024 at 3:01 am #15671842

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

As I mentioned above, we limit one issue per ticket only so I will split the issue with page layout into a new ticket for better handling.

If you see the main issue of this ticket with error 500 is resolved, please mark it as Resolved.

Thanks.