Skip Navigation

[Resuelto] Relationships don't work

This support ticket is created hace 1 año, 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Este tema contiene 5 respuestas, tiene 3 mensajes.

Última actualización por hellobarrio hace 1 año, 6 meses.

Asistido por: Nigel.

Autor
Mensajes
#2601801
Schermata 2023-05-02 alle 10.32.24.png

I have an issue after I update Toolset (3.4.19 v).
(In caps lock you can find my two custom post types slugs)
I have a relation one to many between two custom post types (VINO - RICONOSCIMENTO) and I already have thousand post created and linked with this relationship.
But after the update when I add a new RICONOSCIMENTO and I try to link it to existing VINO the field selection doesn't let me choose any post1 instead it shows me the default wordpress post type.
Furthermore I have the same issue when creating a new, but similar, relationship (obviously with different slug).
As the last thing, all the posts that are already linked with this relationship don't broke my site.
How can i fix that?

#2602089

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi there

I just ran a test on a clean site with just Types 3.4.19 to check things are working as expected, and they are.

While editing child posts I can connect them to parent posts of the correct type without problem.

So it appears there is a problem specific to your site.

Before going any further, can you please verify whether the problem occurs in a minimal install. In this case disable all plugins except Types, and switch to a default theme such as twentytwentyone.

Do you have the same issue?

If so then I think we would need a copy of your site for testing.

Please let us know about the results of the test first.

#2603263

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

When I checked I see you were using outdated Toolset Types plugin version 3.4.17 and I see that even with that version you have issue.

It seems there must be conflict between the third-party plugins you are using.

In order to minimize the cause of the issue and to ensure there is no conflict between the third-party plugins/theme you use:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any issue? If no:

*** Please make a FULL BACKUP of your database and website.***
What if you try the WPML troubleshooting options:
- https://wpml.org/documentation/support/wpml-troubleshooting-options/
-- Remove ghost entries from the translation tables
-- Set language information

I see you are using migrated post relationship, if above steps does not help then we will require duplicator copy of your site.

#2604035

Hi,
i've tried following step by step your suggestions and it still doesn't work. It still search standard post type in the relation even if the relation is set properly. I'm sending a full duplicator copy of production site. enlace oculto

#2605581

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Screenshot 2023-05-12 at 10.22.45.png

Minesh asked me to take over here.

I downloaded and installed the copy of your site. I had to switch theme and disable all plugins to be able to log in to the site.

Once I did I reactivated just Types and WPML plugins and then tested the issue you described.

In which case, connecting posts seems to work normally, see my screenshot.

However, when I re-activated your theme and tested again, I saw that the posts being offered were blog posts, not the Vino posts.

I'm afraid we can't debug custom themes ourselves.

Something in the custom theme interferes with the the query arguments to get the related posts, and I suggest you review the theme code to identify anything that may be responsible for that. When you find something that looks like it may, you can comment out that section and then test again. That should help you isolate what specifically is responsible for the issue.

#2606353

My issue is resolved now. Thank you! The problem was a 'pre_get_posts' hook registered in my functions.php which always filtered by article post type.