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.

This topic contains 8 replies, has 2 voices.

Last updated by Petros 6 months, 1 week ago.

Assisted by: Christopher Amirian.

Author Posts
October 16, 2024 at 7:52 am

Petros

Background of the issue:
I am trying to save a page on my WordPress site. The issue can be seen at the following URL: hidden link

Symptoms:
I encountered an error message: 'Updating failed. The response is not a valid JSON response.'

Questions:
I need to resolve the JSON response error when updating a page.
Using a default WP theme.
No other extensions are active
The website is more than 10 years old
Went through all of the Troubleshooting page tools
I can provide WP access credentials

October 16, 2024 at 8:43 am
October 16, 2024 at 11:52 am #16295191

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

I copied your website to our server and it works with no issues.

you can login with the same credentials here:

hidden link

I think there is an issue on your server, maybe it is a file permission on your server or database-related one. But honestly I am not sure as it is working ok on our server.

I'd appreciate it if you could test there

October 16, 2024 at 12:41 pm #16295516

Petros

Dear Christopher your install works fine! So then it has something to do with the server.
Just re-applied all folder and file permissions, the error persists.
Do you think it has something to do with the PHP setup or the SQL database?
How can I solve this, do you have any tips?
I will contact the server admin about the issue.

October 16, 2024 at 1:30 pm #16296026

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

It is hard to say what might be the problem cause.

I have one idea that might sound counter intuitive but maybe it works.

Is it possible that you ask your admin to copy your website on the same server as a test? Maybe the mere exporting of the website might do the trick.

If so, then you can export back to the main website and it should work ok.

Just a thought you know.

October 21, 2024 at 10:23 am #16311622

Petros

Hello Christopher,
the admin did export and imported the website again, the error persists. He does not have a clou why this happens, everything looks OK on his side.

Can you look at the debug.log on your website copy? You might be getting errors related to the string translation plugin, we are getting alot of them on our side.

Also can you guide me which database tables I can remove in order to completely reset the string translation plugin?

Kind regards
Petros

October 21, 2024 at 2:20 pm #16312893

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Your admin is welcome to login to the copied version in our server and install the WP File Manager plugin and enable debugging in wp-config.php file and test if the same thing happens there or not:

hidden link

I am not sure what else might be the cause. We have a code that usually use which adds tables of string translation if they miss in the database. I suggest that you use:

function wpmlsupp_1891_fix_missing_icl_tables() {
    if( function_exists( 'icl_sitepress_activate' ) )
        icl_sitepress_activate();
}
add_action( 'wp_footer', 'wpmlsupp_1891_fix_missing_icl_tables' ); 

Add the code to functions.php file of your theme refresh the front end once and remove the code after that.

It is a shot in the dark but worth trying.

Thanks.

October 22, 2024 at 7:07 am #16315245

Petros

Ηι Christopher,
your install hidden link does produce the same error 'Updating failed. The response is not a valid JSON response.' when updating a page. Also your debug.log has the same errors as on my server.
So the problem is not server related but WPML related.

I did run the function you provided with no success, I also emptied the tables:
wp_icl_strings
wp_icl_string_batches
wp_icl_string_packages
wp_icl_string_positions
wp_icl_string_status
wp_icl_string_translations
deleted the plugin and re-installed. But the error persists.

Please help

October 22, 2024 at 2:52 pm #16318172

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

That is strange as I tried to save before and it worked. I wanted to check but unfortunately for some reason the system deleted the login information.

Would you please re-submit the login info by setting the next reply as private?

I will check then.

Thanks.

October 23, 2024 at 6:04 am #16319949

Petros

Well you did not debug the site you cloned, Debugging was set to false. I thought that is the first thing you guys do to debug an error. The error in debug.log was crystal clear of the problem. Doing a simple google search you would find multiple posts on WPML support forums with similar issues, the solution is right there. The support is lacking.