Skip Navigation

[Resolved] Errors connecting posts in a M2M relationship programmatically

This support ticket is created 4 years, 3 months ago. 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+01:00)

This topic contains 0 replies, has 1 voice.

Last updated by larryL 4 years, 3 months ago.

Assisted by: Jamal.

Author
Posts
#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