Skip Navigation

[Resolved] Error when submitting repeatable group form on parent post

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

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)

This topic contains 3 replies, has 2 voices.

Last updated by Marlo 3 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2183753

Tell us what you are trying to do?
We have a custom post type called Kennels, We created a trading hour repeatable group field linked to Kennels.
We are trying to create trading hours for a Kennel using a repeatable group CRED form that's located on the post. Each user needs to create different trading hours for there Kennel. We have created a view linked to the trading hours repeatable group fields and added the form in the view. When we submit the trading hour form we get the following error:

Fatal error: Uncaught InvalidArgumentException: All provided arguments for a related element must be either an ID or a WP_Post object. in /home/petfinds/public_html/petscreek.co.za/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/autoloaded/interop/commands/RelatedPosts.php:246 Stack trace: #0 /home/petfinds/public_html/petscreek.co.za/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/autoloaded/interop/commands/RelatedPosts.php(177): OTGS\Toolset\Common\Interop\Commands\RelatedPosts->set_query_by_elements(Array, 'parent') #1 /home/petfinds/public_html/petscreek.co.za/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/public_api/m2m.php(110): OTGS\Toolset\Common\Interop\Commands\RelatedPosts->__construct(0, 'single-trading-...', Array) #2 /home/petfinds/public_html/petscreek.co.za/wp-content/plugins/cred-frontend-editor/application/models/form/post.php(671): toolset_get_related_posts(0, 'single-trading-...', 'parent') #3 /home/petfinds/public_html/pet in /home/petfinds/public_html/petscreek.co.za/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/autoloaded/interop/commands/RelatedPosts.php on line 246

Can you please help with this issue?

#2183875

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marlo,

Thank you for getting in touch.

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

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

Thanks,
Shane

#2184093

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Marlo,

Thank you for the credentials.
I was able to see the issue. The problem is that the Kennel field isn't loading any of the parent posts to be attached to the form. What should happen is that you should get a select2 field that lists out all the kennels.

This isn't happening in your case. I suspect that there might be a plugin conflict of some sort.

Would you mind temporarily disabling all the non-toolset plugins and then trying again to see if this issue remains?

Thanks,
Shane

#2190675

That was my issue. It was a plugin conflict indeed "Email Address Encoder" plugin. My issue is resolved now. Thank you!