Skip Navigation

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

Problema:
Si estás experimentando que una porción de tu página web sigue mostrando el idioma original a pesar de estar traducida en el editor de traducción y en la traducción de cadenas, y has notado que esto ocurre con bloques de Gutenberg que contienen enlaces, es posible que estés enfrentando un problema similar al del cliente.

Solución:
Primero, intenta replicar el problema eliminando el enlace del bloque de Gutenberg para confirmar si la traducción se muestra correctamente. Si al hacer esto la traducción aparece, el problema podría estar relacionado con la forma en que WPML está manejando ese bloque específico.

Para resolverlo, necesitas registrar el bloque de Gutenberg en WPML de manera explícita. Puedes seguir los pasos detallados en nuestra guía sobre cómo hacer bloques personalizados de Gutenberg traducibles: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/.

Aquí tienes un ejemplo de cómo registrar el bloque 'info-box' usando XML:

<wpml-config><br />  <gutenberg-blocks><br />     <!-- info-box from Astra theme --><br />    <gutenberg-block type="uagb/info-box" translate="1"><br />      <xpath>//div/div/p</xpath><br />      <xpath>//div/div/h1</xpath><br />      <xpath>//div/div/h2</xpath><br />      <xpath>//div/div/h3</xpath><br />      <xpath>//div/div/h4</xpath><br />      <xpath>//div/div/h5</xpath><br />      <xpath>//div/div/h6</xpath>       <br />      <xpath>//div/div/a</xpath><br />      <xpath>//div/p</xpath> <br />   </gutenberg-block> <br />  </gutenberg-blocks><br /></wpml-config>

Si después de registrar el bloque el problema persiste, te recomendamos contactar con los autores del bloque o del tema para que te proporcionen el código XML necesario para registrar el bloque en WPML.

Si el problema continúa después de seguir estos pasos, por favor, abre un nuevo ticket de soporte para que podamos ayudarte más a fondo. Te recomendamos también revisar los problemas conocidos en https://wpml.org/known-issues/, verificar la versión de la solución permanente y confirmar que tienes instaladas las últimas versiones de los temas y plugins.

En caso de que necesites asistencia adicional, no dudes en abrir un nuevo ticket de soporte en nuestro foro: https://wpml.org/es/forums/forum/soporte-en-espanol/.

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Carlos Rojas 1 year, 3 months ago.

Assisted by: Carlos Rojas.

Author Posts
February 12, 2024 at 5:14 pm #15294201

pedro-miguelT

Hi, I am translating thi URL hidden link
You can see the translated version on hidden link

The translation is working fine for the rest of the website but, for this specific page, there is an issue I have not been able to solve.

The strange thing is that, even with everything translated, a small portion of the web keep displaying the original language. (See screenshot)

It appears translated on the translation editor and in the string translation, but it keeps displaying the original English. (See screenshots)

I have tried to do small editions to force the refresh, but if I change the English version, the new English version appears, but not the translated one.

On the other hand, the link that appears points to the translated URL.

What can I do to make it display the proper translated content?

Captura desde 2024-02-12 18-06-40.png
Captura desde 2024-02-12 18-05-56.png
Captura desde 2024-02-12 18-03-04.png
February 13, 2024 at 12:25 pm #15297386

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello,
Thank you for contacting us

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to back up the site before providing us access. If we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Regards,
Carlos

February 16, 2024 at 9:25 am #15310592

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi there,

When I tried to reproduce the issue (update the Spanish translation) I got a 500 error which was caused by WP Rocket. I then deactivated WP Rocket, but now I'm getting this message:
"Insufficient Storage
The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. There is insufficient free space left in your storage allocation"

Please fix this issue with your hosting providers and let me know when it's done so we can continue.

February 16, 2024 at 9:43 am #15310675

pedro-miguelT

Hi,
sorry, I think that you just tried when I was updating the backup because I made some small changes yesterday. I have tried to activate and deactivate wprocket and it went well with no issues. You shouldn't face any issues, the website works like a charm.

The only situation in which you may find any issue is after working heavily with many tabs, as the hosting might misunderstand this as an attack and activate some controls over the requests number.

Additionally, the hosting is plenty of resources and we shouldn't have any issues with that.

By the way, we can use Spanish for the support, if it is ok with you.

Please, keep me updated.

Thanks

February 16, 2024 at 9:51 am #15310695

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hola!
Continuemos en Español.

He revisado la página y sospecho que la causa del problema está relacionada con la cache, sin embargo no tengo información suficente para determinar la causa del problema.

Si este problema solamente aparecen en esta página entonces le recomiendo que manualmente edite la página en Español: hidden link y traduzca el contenido del bloque que falta.

February 16, 2024 at 10:33 am #15310996

pedro-miguelT

Hola, he probado y tengo una noticia buena y una mala:
La buena: He conseguido replicar el problema.
La mala: Parece un bug (el tema es Avas, debe ser un problema con el bloque Info Box)

Sospechaba que no era de caché porque ya había quitado el bloque y lo había añadido de múltiples formas y siempre pasaba lo mismo. Pero al probar de nuevo, me he fijado en una posible causa: el enlace.

**Como replicar el problema**

Si en el texto del contenido del bloque Info Box pongo un enlace:
- El texto aparece en el idioma original
- El enlace apunta hacia la página traducida.

Si quito el enlace, la traducción se muestra perfectamente.

He probado a añadir un enlace a otro bloque y el problema se repite, asimismo, al quitar el enlace al bloque con problemas, el problema desaparece. Además, me he dado cuenta de que al principio de la página había otro bloque con un enlace y le pasa lo mismo.

**Workaround**

Como me indica, he probado a editar directamente la página traducida y funciona.

Pero me surgen las siguientes dudas, ¿Qué problemas me puede dar esto para futuras ediciones de la página? ¿Afectará al resto de la traducción o solo a ese bloque?

Y, por otro lado, ¿Alguna idea del origen o cómo solucionar el bug?

Captura desde 2024-02-16 11-18-16.png
February 16, 2024 at 10:41 am #15311120

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Muchas gracias por su mensaje.

De acuerdo a la información que ha compartido puede tratarse de un bug o que el bloque no ha sido registrado y WPML no lo lee correctamente.

Para descartar la segunda posible causa le pido que intente registrar el bloque siguiendo los pasos descritos en esta guía: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/
Lo ideal es que contacte con los autores del bloque (tal vez sean los mismos autores del tema) y les pida que generen el código XML para registrar este bloque en WPML.

Luego compruebe si el problema desapareció.

Nota: En el caso de que luego de registrar el bloque persista el problema, entonces crearé un sitio de pruebas con una nueva instalación de WordPress + WPML y si el problema persiste lo escalaré a nuestro equipo de compatibilidad.

February 16, 2024 at 11:35 am #15311283

pedro-miguelT

Es raro porque esos bloques info-box se usan por toda la web y, hasta ahora, no habían dado problemas para traducirlos.

En cualquier caso, he probado a declarar el bloque `info-box` explícitamente, he tenido que añadir todos los campos del bloque porque, si no, solo me aparecía una traducción parcial.

El tema es Astra, antes me confundí e indique que era otro.

Al registrar el bloque parece que se soluciona. Por si le sirve a alguien más, este es el XML que he usado para registrarlo:

<wpml-config>
  <gutenberg-blocks>
     <!-- info-box from Astra theme -->
    <gutenberg-block type="uagb/info-box" translate="1">
      <xpath>//div/div/p</xpath>
      <xpath>//div/div/h1</xpath>
      <xpath>//div/div/h2</xpath>
      <xpath>//div/div/h3</xpath>
      <xpath>//div/div/h4</xpath>
      <xpath>//div/div/h5</xpath>
      <xpath>//div/div/h6</xpath>       
      <xpath>//div/div/a</xpath>
      <xpath>//div/p</xpath> 
   </gutenberg-block> 
  </gutenberg-blocks>
</wpml-config>

No llego a entender porque lo traducía sin problemas hasta ahora, menos si añadía un enlace dentro del bloque `p` (el que aparece en último lugar). Pero, por algún motivo, al indicarlo de forma explícita, ya lo muestra correctamente.

Así que supongo que lo podemos dar por resuelto.

February 16, 2024 at 12:04 pm #15311449

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hola,
Me alegra saber que el problema está resuelto 🙂

Por favor no dude en contactarnos si necesita de nuestra ayuda en el futuro con WPML.
Saludos cordiales,
Carlos