,

Cómo arreglar el error de publicación de WordPress. La respuesta no es una respuesta JSON válida". Problema

La respuesta no es una copia de respuesta JSON válida

Es posible que se haya encontrado con el problema "Publishing failed. La respuesta no es una respuesta JSON válida" al intentar publicar o cambiar las páginas o artículos de su sitio de WordPress. Este problema también puede haber ocurrido al subir una imagen a su sitio de WordPress.

Si no soluciona inmediatamente este error, puede perder todas las modificaciones que haya realizado en las últimas horas. Este artículo te evitará tener que lidiar con ello.

Hay muchas cosas diferentes que pueden causar que estos errores aparezcan en su sitio de WordPress. Puede tener algo que ver con el servidor web de tu sitio, el archivo .htaccess, un certificado SSL, un plugin, un tema o cualquier otra cosa que tenga que ver. Por lo tanto, la solución que funcione para usted dependerá de los detalles de su situación particular.

In this tutorial, you will learn in detail what caused the error on your site and how to remove it. Let’s get started!

What is a Valid JSON Response?

When you request an API, the response should be in JSON format. You will see the “Updating Failed. The Response is Not a Valid JSON Response” error if the answer is not in JSON format.

There are a few reasons why this error can occur!

1. The API you request does not return data in JSON format. You must check the API documentation to see what format it returns data in.

2. There may be an error in the code that is requesting the API. This could be due to a wrong URL being specified or incorrect data being sent in the request body. 

3. The server the API is hosted on may be down or not responding correctly. In this case, you must contact the API provider to resolve the issue.

3 Easy Ways to Fix the “Publishing Failed. The Response is Not a Valid JSON Response” Error

Actualizar el Permalink

El archivo .htaccess o los enlaces permanentes de su sitio web pueden ser el origen del problema JSON, que es una de las razones más típicas por las que se produce.

Tendrá que actualizar los enlaces permanentes de su sitio para eliminar el problema, y hay dos métodos diferentes para hacerlo. La solución más rápida y directa es utilizar el panel de control de WordPress para activar la opción Forzar a WordPress a generar un nuevo archivo .htaccess.

Navegue hasta el menú de Configuración, y luego a Permalink. En la página de Permalink, pulse el botón Guardar cambios después de desplazarse hasta el final de la página.

permalink-page-on-wordpress

Puede guardar los cambios desplazándose hasta el final de la página de configuración de Permalink y haciendo clic en el botón Guardar.

Please return it to your editor and see whether the mistake still exists; you should no longer see it.

Utilizar el editor clásico

WordPress lanzó en diciembre de 2018 una actualización de su editor clásico, que se conocía como Gutenberg/Block Editor. Desde entonces, muchas personas se han encontrado con la frase "Publishing failed. En este caso, la respuesta no se ajusta a los estándares de respuesta JSON. Y "Hubo un error de actualización". El mensaje de error dice: "La respuesta no es una respuesta JSON válida".

Por lo tanto, muchas personas resolvieron con éxito el problema cambiando al Editor Clásico. Para utilizar el Editor Clásico en tu sitio web de WordPress, primero tendrás que descargar e instalar el plugin del Editor Clásico antes de activarlo.

Learn More: How to Fix Slow WordPress Backend?

If you choose to utilize Classic Editor, however, this will cause WordPress’s brand new Block Editor to be replaced with the platform’s more traditional Classic Editor. Editing your posts and pages will not work the same way for you once you make this modification. It may also affect the formatting & layout of your already-existing pages and posts, particularly those that have been updated using the Block editor in the past. Therefore, before you utilize the Classic Editor, you want to protect your website by modifying a setting inside it.

Take out any characters that aren’t valid

If you attempt to upload photos containing characters that are not allowed in the image name, you may also receive an error message stating, “The response is not a valid JSON response.” Thus, you can rename your picture using solely English letters, numbers, and symbols like supported hyphens. After that, you may try uploading the image with the new name to see whether the problem has been resolved.

Use the Default to GD plugin.

Algunas personas también lograron resolver el problema. Cuando se utiliza el plugin Default to GD, se obtiene el problema "The response is not a valid JSON response". Debido a que WordPress aún no proporciona este plugin, tendrá que descargarlo desde el enlace de GitHub de Default to GD para utilizarlo. Para comenzar el proceso de descarga del plugin, utilice el botón "Código" de esta página. A continuación, haz clic en el botón "Descargar ZIP". Esto hará que el plugin se descargue en tu ordenador.

Afterward, go to the Plugins section of your WordPress dashboard, and click the “Add New” button. Now choose the plugin you downloaded by selecting the Choose File option after clicking the Upload Plugin button. After that, choose the Install Now option. When the installation is finished, you must select the Activate Plugin option. You may immediately check to see whether the JSON response problem occurs when uploading photographs to your WordPress site since it does not involve any configuration on your part. If the issue persists, you may disable and remove the plugin entirely from the system.

Additional Troubleshooting Tips to Fix the Invalid JSON Response Error

  1. Look for rest API conflicts: This means checking if there are any conflicts or errors in the code related to the REST API. This can be caused by multiple plugins or themes trying to access the same API, leading to an invalid JSON response error.
  2. Upload images in a different way: This is useful when an error occurs while trying to upload images to a website. Uploading images in another way, such as through FTP or a different image uploader plugin, can help solve the issue.
  3. Deactivate plugins & themes to find conflicts: By deactivating all plugins and themes and then reactivating them individually, you can determine which one is causing the invalid JSON response error. Once the problematic plugin or theme is identified, it can be fixed or replaced.

Palabras finales

These solutions for fixing the “The response is not a valid JSON response” error work for most people. Still, if they do not work for you, there may be a particular issue with the way WordPress is configured on your website or your web server is set up. This error may occur due to a problem with the REST API, an incorrect setup in the NGINX server, security plugins like Wordfence, or security policies like Web Application Firewall. In situations like these, one option is to seek solutions unique to the given locations.
Refer to Seahawk Media for more such articles.

Entradas relacionadas

Komal Bothra May 25, 2023

Las mejores agencias de desarrollo de WordPress en 2023

According to recent statistics, WordPress has become a go-to platform for anyone who wants to

Agencia
Komal Bothra May 24, 2023

MemberPress Plugin Review

Are you struggling to monetize your online content? Do you want a hassle-free way to

Tecnología
Komal Bothra May 24, 2023

Ninja Forms Review 2023: A Powerful WordPress Form Builder

In the ever-evolving world of WordPress, Ninja Forms has significantly impacted as a reliable and

Tecnología

Empezar con Seahawk

Regístrate en nuestra app para ver nuestros precios y obtener descuentos.