Thank you for contacting WPML support. I'd be happy to assist you on this issue.
It looks like there is some php error happening on your site which is creating the problem, being so can you please follow the below steps and share me the results.
I am experiencing a persistent issue with WPML on my staging site:
Staging site URL: hidden link
Whenever I try to access certain pages, especially /en/wp-json/ or /en/test-wpml/, I get a 500 Internal Server Error.
The Apache error log shows the following message:
[core:error] [pid 39635:tid 39635] [client 94.253.188.89:12148]
AH00124: Request for staging2.luminx.no:/home/u3-ds6phfvu4ix1/www/staging2.luminx.no/public_html
exceeded the limit of 10 internal redirects due to probable configuration error.
Use 'LimitInternalRecursion' to increase the limit if necessary.
Use 'LogLevel debug' to get a backtrace.
I suspect this is caused by a redirect loop related to WPML language directories (/en/, /no/).
Here is the current .htaccess configuration on the staging site:
# BEGIN HTTPS forced by SG-Optimizer
<IfModule mod_rewrite.c>
RewriteEngine On
# Force HTTPS
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ hidden link{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
</IfModule>
# BEGIN Custom WPML login redirects
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect WPML login pages to main wp-login.php
RewriteRule ^en/wp-login.php$ /wp-login.php [QSA,L]
RewriteRule ^no/wp-login.php$ /wp-login.php [QSA,L]
</IfModule>
# BEGIN WPML REST API fix
<IfModule mod_rewrite.c>
RewriteEngine On
# Prevent /en/wp-json/ or /no/wp-json/ from redirect loop
RewriteCond %{REQUEST_URI} ^/(en|no)/wp-json/ [NC]
RewriteRule ^ - [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.
So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link
I have checked again and can confirm that the issue is still occurring.
1. When I try to save a page, sometimes the save goes through successfully, but quite often I encounter the error: **“Updating failed. The response is not a valid JSON response.”**
2. I have also recorded a video demonstrating another bug. The issue happens on the frontend when a user switches from one language to another and then switches back to the original language. At that point, an **“Internal Server Error”** appears.
Please take a look at the video where the issue is demonstrated.