Skip Navigation

[Resuelto] Translating custom taxonomy errors

This support ticket is created hace 2 años, 9 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Este tema contiene 18 respuestas, tiene 2 mensajes.

Última actualización por alexG-11 hace 2 años, 9 meses.

Asistido por: Shane.

Autor
Mensajes
#2280003

We are ceating a directory with toolset. I have errors translating custom taxonomy:

- On wordpress archive view throws an 500 error on the translated language.
- wpv-post-taxonomy field, doens't display right the taxonomy. Instead it display

We are following this links

https://toolset.com/course-chapter/translating-directory-and-classifieds-sites/

#2280023

I think we are forguive somthing but I don't know what it is.

In the single view form the the custom type "Artista", the wpml switcher desapears.

#2280061

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

Thank you for getting in touch.

It would appear that your having an internal server error.

What we recommend doing here is to enable the wordpress debugging functions to understand the error being thrown.

To enable the wordpress debugging you will either need to log into your website using FTP or using your Host's CPanel's file manager.

From there you will need to edit the wp-config file by adding the following.

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

If the define( 'WP_DEBUG', true ); function already exists you will need to change 'false' to 'true'

Once you've done this please revisit the page with the issue and let me know what the issue is.

Thanks,
Shane

#2280449

Hi

Thanks Shane. I have activated the debug but in this moment it doesn't throw any error.

About the errors.

- On wordpress archive view throws an 500 error on the translated language.

This problem is resolved. I don't know how, but this morning the problem is resolved.

- wpv-post-taxonomy field, doesn't display right the taxonomy.

This problem still doesn't I try to save again the custom types, the items, the view, the custom template, change the short code,... Seems this conection doesn't is stored correctly in multilang.

#2280787

I translate all the site, forms, content templates, views,... and the problem of the custom taxonomy in multilanguage, storing with the cred from and backend persist.

The log throws this Notice:.

[01-Feb-2022 14:12:19 UTC] PHP Notice: Trying to access array offset on value of type null in /.../functions.php on line 532

I this line we have this function

https://toolset.com/forums/topic/default-value-for-taxonomy-in-cred-form-and-unificate-validation/#post-2262647

#2280791

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

Thank you for the follow up.

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.

Thanks,
Shane

#2280807

In the frontend you can see one of the "artist" has no taxonomy in catalan with he has it in spanish. The problem is the same in reverse if you store something in catalan it doens't save the taxonomy in spanish.

#2280811

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

I'm not seeing where you've shared a link to an example page where I can see the issue.

Thanks,
Shane

#2280813

In the front page
enlace oculto

And the artist detail.
enlace oculto

As you can see here the category is forced in the backend and is displayed "Teatre" under the name and the end of the page in this message: Més artistes a Teatre.
enlace oculto

#2280819

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

Thank you for the links but perhaps i'm not understanding the issue fully. I see that the artist below doesn't have a category being displayed.
enlace oculto

I checked and it was because there wasn't any selected on the backend. Can you provide a bit more detail on what is being displayed and what should be displayed?

Perhaps a screenshot or a screencast explaining the issue.

Thanks,
Shane

#2280905

We have a custom taxonomy called disciplines for a custom type called Artista. Mi problem is when I save the form in the frontend or backend in any language this taxonomy not's stored in the other language.

So this shortcode

[wpv-post-taxonomy type="disciplines" format="name"]

doesn't display nothing.

Doesn't happens with a custom field of this type.

#2281071

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

I tried to test this out for you by creating a test post below.
enlace oculto

However when i used the [wpv-post-taxonomy type="disciplines" format="name"] shortcode the taxonomy that was selected does display.

I also found that you're wrapping your shortcodes in a conditional tag.

[wpv-conditional if="( $(wpcf-estat-perfil-artista) eq 'publicada' )"]
  <section class="artist-hero">
   <img src="[types field='imatge-principal' output='raw'][/types]" alt="Imatge principal de [wpv-post-title]" />
    <div class="content">
      <div class="container">
          <h1>[wpv-post-title]</h1>
          <h2>[wpv-post-taxonomy type="disciplines" format="name"]</h2>

Unless the conditional tag information is met then the items within the tag will not display anything.

If you add the <h2>[wpv-post-taxonomy type="disciplines" format="name"]</h2> shortcode outside the conditionals you will see that it does display the correct taxonomy.

Thanks,
Shane

#2282789

I know there's a second view salling this artists has not a aproved profile.

I put the

[wpv-post-taxonomy type="disciplines" format="name"]

At the bottom of the view

As you can see here.

enlace oculto
enlace oculto

There are not errors because beacuse i forced in backend the disciplina (the custom taxonomy) in both languages.

As you can see here

enlace oculto

The disciplina is displayed because i inserted the profile in the frontend.

But here

enlace oculto

We can't see the disciplina beacuse when I insert the taxonomy in one language is not inserted in the other.

#2282911

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Alex,

It would appear that the issue was that your Post type was not set to be translatable so it wasn't being translated into your secondary languages.

I've enabled the translation on your custom Post Type and you should now be able to translate the post and the translated taxonomy should now be showing on the frontend.

The settings for making a post translatable can be found at WPML -> Settings -> Post Types Translation

Thanks,
Shane

#2283479

I don't know what happens before that changes. That's not the behavour we need. Before this action the second language has any artist in this moment, even manual translation from the moderator. As you can see here:

enlace oculto

3 artist are visible in the loop.

enlace oculto

Here is empty.

The artists has to create the profile in one language and has to be autotranslated or replied to the other, without any translation in the backend o the frontend.

Excuse me, i if didn't explain it right.