Skip Navigation

[Résolu] Errors connecting posts in a M2M relationship programmatically

This support ticket is created Il y a 3 années et 6 mois. There's a good chance that you are reading advice that it now obsolete.
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+00:00)

This topic contains 0 réponses, has 1 voix.

Last updated by larryL Il y a 3 années et 6 mois.

Assisted by: Jamal.

Auteur
Publications
#1788679

I am trying to connect posts in a M2M relationship programmatically but I got the following errors:

Fatal error: Uncaught InvalidArgumentException: The element to connect with doesn't belong to the relationship definition provided. in /home/s3361/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/m2m/potential_association/query_posts.php:85 Stack trace: #0 /home/s3361/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/m2m/potential_association/query_factory.php(34): Toolset_Potential_Association_Query_Posts->__construct(Object(Toolset_Relationship_Definition), Object(Toolset_Relationship_Role_Child), Object(Toolset_Post), Array, NULL, NULL, Object(Toolset_Potential_Association_Query_Factory)) #1 /home/s3361/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/m2m/driver.php(39): Toolset_Potential_Association_Query_Factory->create(Object(Toolset_Relationship_Definition), Object(Toolset_Relationship_Role_Child), Object(Toolset_Post)) #2 /home/s3361/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/m2m/database/op in /home/s3361/html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/m2m/potential_association/query_posts.php on line 85
There has been a critical error on your website.

#1788723
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.