Skip Navigation

[Resolved] Repeatable field

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 22 replies, has 3 voices.

Last updated by quentinN 1 year, 10 months ago.

Assisted by: Nigel.

Author
Posts
#2515631

Hello,

I have had a problem for several months on the blokiwood.fr site with Toolset.

Indeed, there seems to be a close relationship between the 2-page customs posts: the home page and the achievement page.

The realization page uses a group of repeatable field "A realization (Repeatable Group)" which allows to manage a mosaic of clickable photos.
The repeatable field therefore systematically requires:
- a photo
- a destination ID to make the mosaic clickable
- text on mouseover
- a "Type of achievement" category to manage a search filter in the mosaic if necessary (but currently it is not used)

The home page uses a lot of custom fields and repeatable fields for multiple information displays.

The problem is that now, when I add a repeatable field for one or the other of these pages: the fields of the other page no longer appear on the site and are even emptied (partially) in the backoffice of this page.
Until now I overcame this problem by adding false fields (on hidden link and hidden link admin/admin.php?page=wpcf-edit&group_id=9941) named very strangely because apparently the fact of putting a false field in 1st position let reappear the 2nd which is useful to me (the mosaic on the realization page or the others home page fields).

Only today, since the addition of a repeatable custom field "Agenda" on the home page, it is impossible for me to display the 2 information..
Extra strange thing: I can't delete the Repeatable Groups in the backoffice (those with a strange, unimportant name).
So I find myself in a vicious circle where nothing makes sense in my back office.
I use Toolset on about 50 other sites and never had this problem..

For information, I have had this problem for some time and the WordPress and Toolset versions, up to date or not, did not change anything.
A related old ticket: https://toolset.com/forums/topic/repeatable-fields-no-longer-work-and-impossible-to-remove/

Can you do something ?

Cordially,

Quentin

#2516109

Hello,

The problems you mentioned above is abnormal, please check these:
1) Deactivate other plugins and switch to WordPress default theme, and test again
2) If the problem still persists, please provide a copy of your website in below private message box, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2516231

Hello,

The Duplicator plugin is already in place.
The last time it was one of your colleagues who took care of the backup.

On my side, it does not work, I have an error message that the server cannot manage the assembly.. and I do not have Google Cloud or Dropbox..
Can you manage this duplication with your Cloud resources?

#2516753

I have tried the credentials you provided above again, but get below error message:

You do not have sufficient permissions to access this admin page.
Reason: The user "Toolset_Admin" doesn't have the "read" capability that is required to access the "Tableau de bord" menu item.

Can you fix it? or provide the duplicator package file link in below private message box

#2517033

Can you retry please ?
Your account is now administrator.

#2518557

Thanks for the details, I am downloading the package files from your website, will update here if find anything

#2518697

Thank you for your help, I look forward to hearing from you.
Quentin

#2522321
rfg2.jpg

Sorry for the delay answer, I can install the duplicator package in my localhost.

When I edit those two custom field groups, I see below error message:
Group with ID 9941 do not exist
Group with ID 4874 do not exist

It seems to be a cache problem of your website, those two field groups have already been deleted, but some other cache plugins conduct the problem.

Please try these:
1) Create another new field groups, setup the repeatable fields and test again, it works fine in my localhost with your duplicator package file, see my screenshot
2) Disable/clear the cache plugins of your website, and test again

#2524263
screencapture-blokiwood-fr-wp-admin-admin-php-2022-12-29-09_37_40.png

Hello and thank you for your answer.

Unfortunately, I don't have a problem with creating repeatable fields in the interface.
It is rather that there seems to be a clash between 2 grouped fields.

Did you manage to reproduce my error:
- The repeatable field "Une réalisation" of the field group "Page Realisations" (type: page) does not always appear in the Realisations page (hidden link) if in the meantime I have created another repeatable fields on the site (see attached screenshot).
I am systematically obliged to create a "false" repeatable field (see attached capture) so that the repeatable field appears in the BackOffice of the page

Quentin

#2531067

Sorry for the delay answer, as the screenshot I provided above, there isn't same issue in my localhost with your duplicator package, So there should be other server/cache issue in your website.

If you need more assistance for it, please backup your website, and provide your website credentials in below private message box, I need to deactivate plugins/theme in your website

#2532095
#2539797

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-01-23 at 09.50.17.png

Hi there

Luo is on vacation and I'm checking his queue, I see this is outstanding. Sorry for the long wait for a reply, I will take over here.

I tried to log in to your site but cannot.

Note, it would very much be preferable if you could provide credentials for a staging server rather than your production site.

#2539817

Hi Nigel,

It's done : you got Admin role.

Quentin

#2540003

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Quentin

I don't know the history of the site to understand why the problem arose, but I identified why it is currently broken.

Namely, the database table wp_toolset_relationships is corrupted. Specifically, the id column should be the unique key, set to auto-increment, but it is not, so all of the entries (and there are very many duplicate entries) have id=0, and these entries are essentially useless.

The only real way to recover the use of this table is to delete it and allow Toolset to recreate it.

I did that (using phpMyAdmin) on my local copy of your site, and observed that the table was recreated correctly with the right settings.

The relationships table is involved because Types handles repeatable field groups as related posts (each group of fields is stored as a child post of the post the fields pertain to).

It is also necessary to delete all the posts (and their post meta) for any custom field group that included repeatable field groups. (Data about custom field groups are stored in wp_posts; if you edit a field group you will see the post id for that field group in the url.)

Unfortunately I don't see any alternative to this, and it means losing your current repeatable field group definitions, which will need to be recreated. Note that you can re-use individual fields previously declared via the "Choose from previously created fields" button on the Add New field dialog.

If you don't have ready access to phpMyAdmin you can use a similar interface to directly edit the database contents using the Adminer plugin (https://wordpress.org/plugins/pexlechris-adminer/).

If you need help with that, let me know.

Naturally, before going any further you should ensure you have a current backup.

#2540361

Hello Nigel,

Okay, no worries, I'll do what's needed.
If I understand correctly, ideally we should :
- Delete only the "wp_toolset_relationships" table in the database
- This same table will be automatically recreated?
- Re-enter the values in all (pages and articles) of the custom fields that have been deleted?

Is there anything else I missed?

Thanks for your investigation,
Quentin