Skip Navigation

[Resolved] repeatable field groups and post reference fields are not working

This thread is resolved. Here is a description of the problem and solution.

Problem:
Since the release of Types 3.0, repeatable field groups and post reference fields are not working with WooCommerce products or other 3rd party custom post types.

Solution:
https://toolset.com/errata/repeatable-field-groups-and-post-reference-fields-are-not-working-with-woocommerce-products/

This support ticket is created 6 years, 5 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 9 replies, has 2 voices.

Last updated by Beda 6 years, 5 months ago.

Assisted by: Beda.

Author
Posts
#924938

Hi, i copy following thread, since i have exactly the same problem. But deleting, reloading, changing theme, deactivating all plugins has not helped. i do not see the button to add repeatable field group. i would ve
https://toolset.com/forums/topic/repeatable-field-groups-no-option-to-create/

I am following the instructions here to create a new group of repeatable fields for my "Products" Types custom post type:

https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/

I am running the latest versions of Types and Views.

I have created my custom fields group and assigned it to the single post type "Products". I expected a button to appear to allow me to create a new repeatable group, but no button appeared.

I have tried this a few times with different permutations, but still no button to create a new repeatable group is appearing.

#926083

On that other ticket's Website there are 18 pending updates.
Toolset is fairly outdated there.

In your case this seems different.
The issue is wider on your site, I see.

For Example no custom field is, or can be activated. Not even new ones.
So, this is a edge issue with some other plugin or custom code or specific setting that corrupts the situation.

I know that this does not happen with just Toolset, as I used it just now to test this.
It has hence to be something that is either set within the specific install or a compatibility issue or a custom code.

Can you provide me a copy of this site so I can have a closer look?

#942091
#943795

found it!

i searched for the problem in code, which was here:

\includes\classes\class.types.admin.edit.fields.php

	protected function button_add_new_repeatable_group( $clasess = array() )
	{
		if ( false === apply_filters( 'toolset_is_m2m_enabled', false ) ) {
			// m2m disabled, don't show the button to add a new field
			return array();
		}

so, many to many is disabled. looking for it in the types settings, i had to run a migration for m2m ?
this site startet some 6 month ago (customer taking his time :-)), so apearently this is a new function and the migration had to run first.

Edit: repeatable field groups are an enormous addition to toolset. i love it! it opens up a whole new range of usecases without having to create a posttype for every little data container. and the data is easy sortable by the user.
10 thumbs up!!

#945296

i got next problem. the values entered in the field groups are not being stored.
hidden link

i testet this on a newer setup and it works. is there a way, to completely remove types, including all settings?
(i dont mind about the data entered, it's very little that i can copy away into a .txt)

#948959

Somehow the Duplicate Link returns a 404.
Unrelated to that:

- Yes, I apologize I did not even think about this possibility.

It's correct that on sites that where already built with Toolset Types pre 3.0 you need to run the migration (if you had post relationships) to see the new features, and as well to make them work with the "old" content type.

- Thanks for the appreciated feedback on the features, I love that you love it.

- The last issue you see, that should be fixed in Types 3.0.4

Probably on the new site you accidentally already got that new version and that is why it's not visible there anymore.

But strange is you already use 3.0.4 according your Debug Information.

==> I'd need to be sure, that the fix we pushed last Friday for this exact issue is as well applying to migrated sites.
Is it possible to get a copy of named site so I can test it locally?
(As stated above somehow that link is leading to a 404)

If you prefer to scratch from start, you can do that (if you have as less actual content as you mention) this way:
- create a new Install of WordPress
- Install and Activate the Toolset
- Migrate the old contents with some migration tool like our Toolset > Import / Export, or modules manager, and after you can re-apply the content exported with the WordPress native exporter for posts (they also include fields)

Now, if this is not hassle for you it may be the fastest to proceed, but from my place I'd need to know why this happens and wether Toolset needs some fixing here or not.
Locally I wasn't able to replicate this from a legacy site but there are so many factors that can play wrong... If you wouldn't mind to send a copy of the site, even if you close the ticket later, I can still analyze it and ensure correctness on our end.
https://toolset.com/faq/provide-supporters-copy-site/

Thanks!

#948960

Wait, I saw the copy on your site and am checking that out - as soon it's downloaded I'll deploy it

Meanwhile, can you try this:
- head to the Repeatable Field Group which is problematic
- save it
- Try again to save a post with such a field

#949045
#949050
Bildschirmfoto 2018-07-17 um 17.21.49.png

That is why I could not get the duplicate, as now the URL is probably different.

Anyway, I still see all groups are not active.
See screenshot (this time it should be attached)

That is unexpected, they should be activable but are not.

But in any case I was able to replicate the BUG with just Types and WooCommerce.
The Custom Repeatable Field Groups are not saved in products.

I informed the developers.
As soon it's fixed ill inform you here.

#950162
#950590

Thank you Beda. That's fine for me.
Not sure how to answer this thread. i hope set to resolved is ok.

#952055

It's now even released in the stable version.
You can update and forget about it.

Thanks!