Skip Navigation

[Waiting for user confirmation] When I try to add a repeatable field WordPress has a critical error

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 1 voice.

Last updated by Minesh 10 hours, 43 minutes ago.

Assisted by: Minesh.

Author
Posts
#2842336

I am trying to add a repeatable field as a custom field for a custom post type. I'm getting the following error when I try to save the custom fields:

Fatal error: Uncaught Error: Call to a member function get_slug() on false in /home/site/wwwroot/wp-content/plugins/types/application/models/field/group/repeatable/service.php:286 Stack trace: #0 /home/site/wwwroot/wp-content/plugins/types/vendor/toolset/types/includes/classes/class.types.admin.edit.custom.fields.group.php(1407): Types_Field_Group_Repeatable_Service->create_relationship_one_to_many_between_groups(Object(Toolset_Field_Group_Post), Object(Types_Field_Group_Repeatable)) #1 /home/site/wwwroot/wp-content/plugins/types/vendor/toolset/types/includes/classes/class.types.admin.edit.custom.fields.group.php(1238): Types_Admin_Edit_Custom_Fields_Group->save_group_fields(255) #2 /home/site/wwwroot/wp-content/plugins/types/vendor/toolset/types/includes/classes/class.types.admin.edit.custom.fields.group.php(130): Types_Admin_Edit_Custom_Fields_Group->save() #3 /home/site/wwwroot/wp-content/plugins/types/vendor/toolset/types/admin.php(496): Types_Admin_Edit_Custom_Fields_Group->form() #4 /home/site/wwwroot/wp-includes/class-wp-hook.php(341): wpcf_admin_menu_edit_fields_hook('') #5 /home/site/wwwroot/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #6 /home/site/wwwroot/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #7 /home/site/wwwroot/wp-admin/admin.php(242): do_action('load-toolset_pa...') #8 {main} thrown in /home/site/wwwroot/wp-content/plugins/types/application/models/field/group/repeatable/service.php on line 286

#2842368

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to clarify here, do you want to add repeating field (multiple-instance field) or repeating field group?

Before going anything further, can you please make sure you have unique slugs available across your post types, taxonomies, custom fields etc..etc..

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 difference?

Can you please share to what post type you are trying to add that field as well as exact steps that should I follow that help me to reproduce the issue.

#2842432

Hello, I deactivated all plugins and set the site to use the default theme and still had the same issue.

When I go to Toolset > Custom Fields > Locations > Add New Repeatable Group

And then a give it a unique name/slug and then click on Add New Field and also give that a unique name/slug. And then I click Save Field Group, I get a critical error.

Thanks!

#2842572

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked with the brand new sandbox site and you can auto-login to it using the following link:
=> hidden link

I tried to add repeating field group the the following custom field group and it works without any issue.
=> hidden link

It seems to be specific to your site. What if you try to add a brand new install (test site) on your server or difference server and try to add custom field group.

Did you check the error logs - do you see anything with the error logs?
- https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging

I see all plugins are active on your install. What if you keep those disable and run a test.

#2842604

Hello,

I have tried disabling all plugins and using the default theme and I'm still not able to add a repeatable field.

I also enabled debugging that is how I got the error I provided above.

The site is hosted on Azure, could that be the issue?

Thanks,
Claudia

#2842744

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I'm not sure what could be the issue as with standard WordPress setup which I shared as sandbox site I do not able to reproduce it.

What if you try on different server/host?

#2842776

Hi,

We're not able to run a different host/server. This is the client's existing setup.

Whenever I add or save a Repeatable Field Group, WordPress throws a fatal error and the group does not save:

Fatal error: Uncaught Error: Call to a member function get_slug() on false
in /wp-content/plugins/types/application/models/field/group/repeatable/service.php:286

Types_Field_Group_Repeatable_Service->create_relationship_one_to_many_between_groups()
Key observations

The error happens before any database INSERT occurs

No SQL errors are logged

Toolset Relationships work correctly when created manually

The database schema for Toolset tables is intact

The failure occurs consistently on repeatable group save, even with a single text field

Environment

WordPress: latest stable

Toolset Types: tested multiple recent versions (same behavior)

PHP: 8.1 / 8.2 tested

Hosting:

Azure App Service (Linux)

Azure Database for MySQL

Azure Front Door (no WAF enabled)

This site is behind Azure Front Door, but:

Caching is disabled

No rule sets attached

Correct origin host header is configured

App Service has been restarted multiple times

I use Toolset extensively on many other sites (non-Azure and Azure without Front Door) and have never encountered this issue before.

What I’ve already tested

Reinstalling Toolset Types

Clearing Toolset and WordPress caches

Verifying wp_toolset_relationships and wp_toolset_type_sets tables

Confirming relationships can be created and queried successfully

Testing on different post types (including Posts)

Confirming the repeatable save never reaches a DB insert

Testing with and without Front Door–specific header overrides

At this point, all evidence points to Toolset expecting a relationship object during repeatable group creation that is returning false, and the code path not handling that condition gracefully.

Request

Could you please:

Confirm whether this is a known issue with Repeatable Field Groups in this type of environment, and/or

Advise if there is a patch, workaround, or configuration flag, or

Let me know if you’d like a minimal reproduction or additional logs

I’m happy to provide:

Full stack traces

DB schema output

Query logs showing no INSERT attempt

Access to a staging environment if needed

Thanks in advance — I appreciate any guidance you can provide.

Best regards,
Claudia

#2842823

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I tried to access the site but it shows messes site is not available. As it seems the error related to slug.

What if you try to use different repeating field group slug, like "rfg-event-location" instead of only "location". Try to make sure you use unique slugs sitewide and see if you able to save the repeating field group.