Skip Navigation

[Resuelto] Problem Using Relationship API

This support ticket is created hace 3 años, 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por julieP hace 3 años, 5 meses.

Asistido por: Jamal.

Autor
Mensajes
#2071937

I have a cred_generic_field on a form that displays a list of post titles (from a related post type) and saves the post's ID when the form is submitted (if one of the values has been selected). The relationship is one to many, the edit form is for the child post. The original cred relationship field is included on the form and hidden using CSS. In a cred_save_data hook I'm using the toolset_get_related_post function to get the current related post ID and then using the toolset_disconnect_posts function to remove the current relationship. In a cred_submit_complete hook I then get the ID of the post that was selected and use it to create a new (replacement) relationship for the post. However, the old relationship isn't removed and the new one isn't created. Any idea what the problem might be?

#2071961

Hello and thank you for contacting Toolset support.

Well, without more details about it I can't really tell what's the issue. Was this working before or is it your first attempt?

Would you like to reproduce a minimal case in this test site? enlace oculto

Can you share the custom code that you are using?

#2074837

I took a different approach so not an issue now