Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 3 voices.

Last updated by Waqas Bin Hasan 1 year, 10 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 11, 2023 at 2:12 pm #14189021

bryanC-16

Tell us what you are trying to do?
When I publish a non-english post, it causes internal server errors on the site due to rewrites to the htaccess file

Is there any documentation that you are following?
I contacted support about this previously and followed the steps

Is there a similar example that we can see?
I can give you staging access

What is the link to your site?
hidden link

August 11, 2023 at 5:21 pm #14190111

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Before this ticket gets assigned to one of my colleagues, I will try to help.

Usually, the 500 errors (Internal Server Errors) are related to the server configuration or server limitations being reached.

You can check our documentation to see if you meet all the WPML minimum requirements here: https://wpml.org/home/minimum-requirements/

Also, please take a look here:
https://wpml.org/faq/500-error

You can also activate WordPress debug to find out more about what is actually happening when you receive that 500 error (activate this and then try to replicate the error):
https://wpml.org/documentation/support/debugging-wpml/

If you find the complete error message, please do share it with us, too, in this ticket.

I hope that you will find this information helpful.

Please let us know how things go.

PS: I saw the ticket that you mentioned you had opened recently (https://wpml.org/forums/topic/this-plugin-is-causing-an-internal-server-500-error/) but I see that you never replied back to my colleague so the ticket got automatically closed. I just wanted to let you know about the status of that ticket and why it is marked as CLOSED.

Kind regards,
Mihai Apetrei

August 14, 2023 at 11:49 am #14197035

bryanC-16

I've checked this with the developers for my site. Here is what they said:

a) Usually, the 500 errors (Internal Server Errors) are related to the server configuration or server limitations being reached.
Also, please take a look here:https://wpml.org/faq/500-error

This is indeed a server configuration issue which is caused whenever WPML changes the .htaccess configuration file and insert erroneous directives, to be more exact, the following get changed:
"RewriteBase /" ==> "RewriteBase /es/"
"RewriteRule . /index.php [L]" ==> "RewriteRule . /es/index.php [L]"

This issue seems to be related to this: https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/

b)

The installation is set to use 512M, PHP8.0 and MySQL version 5.7.39. The eval() is allowed, the libxml is version 2.9.10, everything exceeds the minimum requirements defined in the above URL.

I have added a file using "<?php phpinfo();?>" (as mentioned in the WPML minimum requirements page)

c)

Finally, I've linked to an error log here: hidden link

August 15, 2023 at 9:12 am #14201927

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Bryan,

Thank you for contacting the support. I am assigned this ticket and 'll try my best to help you fix the problem.

First of all, did you try the fix from Errata and did it help by any chance?

Secondly, in the error log, I didn't find any error pointing to WPML but a lot of warnings pointing to /wp-content/plugins/webp-express/ plugin. And a fatal error about memory being exhausted:

AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 8388616 bytes) in /bcmawriter2-www/wp-includes/class-wpdb.php on line 3130'

While you 've enough memory allocated already.

So before proceeding further, may I ask you to try the following?

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

- Update WordPress to the latest version.
- Update all WPML plugins to the latest versions, as well as, other plugins and themes.
- If this still runs you into same problem, then switch to a standard WP theme like 2021 or 2023, deactivate all plugins except WPML and its addons and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- Finally switch back to your theme and check for the problem.

Please let me know about your findings and I'll try my best to help you further on the matter.

Regards.

August 15, 2023 at 2:27 pm #14203793

bryanC-16

I'm a bit confused. The Errata fix referred to is marked as a "temporary" solution.

https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/

August 16, 2023 at 10:18 am #14208457

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, all solutions mentioned in an errata are temporary solutions, until these are fixed in a new release. Since the said errata is marked as Resolved, it means this was fixed sometime around WPML version 4 and shouldn't need to apply.

However, sometimes a bug can return or an earlier fix may have a conflict with new developments.

That's why, you can try that fix to see if it somehow fixes the said problem. So I can then report to the relevant team (i.e. if the bug's returned).

On the other hand, I also mentioned an initial debugging process which you should try to see what's actually causing the problem (i.e. the suspected conflict).

The topic ‘[Closed] internal server errors’ is closed to new replies.