Skip Navigation

[Resolved] Repeatable fields no longer work and impossible to remove

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 10 replies, has 2 voices.

Last updated by Jamal 3 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1882493
Capture d’écran 2020-12-21 à 11.15.54.png
Capture d’écran 2020-12-21 à 11.10.05.png

Hello,

Some repeatable fields no longer work.
The add button is visible but the fields no longer appear and the button clicks in the blank.

When I deactivate the plugin, the repeatable fields appear well on the site (so the database works).

From time to time I add a new block of repeatable fields in the first position to have the repeatable fields reappear.

And it is impossible for me to delete the repeatable fields!
I have an error message in php alert: "blokiwood.fr says: An error occurred while loading the group of repeatable fields."

To summarize:
My repeatable fields don't appear in front and back office anymore unless : I disable the plugin or I add a fake block of repeatable fields (which will be in bug instead of the other one).

I have disabled all plugins and simply leave

Can you help me?

PhP version 5.2 (upgraded to 5.3 but nothing changes) and Types plugin version 3.4.4

#1882709

Hello Quentin, and thank you for contacting the Toolset support.

Please note that Toolset requires at least PHP 5.6. Check the requirements here https://toolset.com/toolset-requirements/

I was able to add a new repeating group without issue. Check this screenshot hidden link

But, I can see the issue of unavailable fields in the backend on a new private page hidden link
So, I deactivate WP Rocket just to test, but it did not help.

Can you explain what do you mean by "When I deactivate the plugin, the repeatable fields appear well on the site"? What plugin do you mean?

Also, please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Twenty. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at a time to track where the incompatibility is produced.

If this does not help find the origin of this issue, we may need to take a copy of your website for further analysis locally, let me know if that's ok with you.

#1882751
Capture d’écran 2020-12-21 à 15.25.36.png

Hello Jamal, thanks for your work.

By "When I deactivate the plugin, the repeatable fields appear well on the site" I mean that when TYPES is active and the repeatable field "Thumbnails Achievements" is not clickable, the already saved thumbnails do not appear on the page (ex here: hidden link) even though they do exist in the database.
But IF I disable the TYPES plugin --> the achievements page displays all the content (the repeatable fields "Thumbnails Achievements").

The entries already registered in the database work well, it is the plugin which, when it blocks the insertion of the fields (and the loading of the existing ones), does not display on the current page either.

I've already tried to disable all plugins, it doesn't change anything. When only TYPES is enabled, the problem exists.
I've been using a self-coded theme based on TwentyTwelve for 4-5 years on about 100 sites all equipped with TYPES, this is the first time I've encountered this problem!

You have my agreement to duplicate and test it!

Translated with hidden link (free version)

#1884159

I can see these issues, and I find it weird that the theme's template is still able to query the repeatable field items, using our API for WP_Query, with the following code:

query_posts(array('post_type' => 'vignettes-real','showposts' => 9999, 'numberposts' => -1, 'orderby' => 'rand','order'    => 'ASC', 'toolset_relationships' => array('role' => 'child','related_to' => $post->ID,'relationship' => 'vignettes-real')))

To better analyze this issue, I would like to take a copy of your website and analyze it locally, would that be possible?
We usually use Duplicator or All In One Migration to take the copy.

Can you also ask the hosting provider to purge any caching system at the server level?

Regarding the deletion of the fake repeatable fields, only the last one is removable. I was able to remove all the fake fields by reordering the RFGs, using Drag and Drop, and deleting the latest one each time.

#1884743

Yes of course you have my permission to copy the site locally.

#1886559

My apologies for the late reply but I do not work on Wednesdays and Thursdays.

Unfortunately, I could not log in to the backend with the provided user. It seems that it does not have the administrator privilege anymore hidden link
I'll need administrator privileges in order to take the copy, first, to access the admin area, and because I might need to install the Duplicator plugin or the All In One Migration plugin.
If you are comfortable using one of these plugins, please take a copy and make sure to exclude the uploads folder to reduce the size of the copy. Then add a download link to your next reply, which I am setting to be private.

#1886579
#1886663

Thank you Quentin.
I just took a copy and built it locally. I'll get back to you as soon as possible.

#1889651

Hello Quentin,

I was not able to determine the cause of these issues, so I reached our 2nd Tier for assistance, and he finds out that the database is not consistent, and that unfortunately, we do not have a way to correct it unless we have a working backup of the website. So, I wonder if you have an old backup that does not present this issue.

Our 2nd Tier thinks that this inconsistency may be caused because your server does not meet Toolset requirements https://toolset.com/toolset-requirements/
- PHP 5.6 and above.
- MySQL 5.6 and above.

Starting with Types 3.4, we have changed the way relationships are managed. This change has introduced a new schema in the database, and the old table that holds the relationships were renamed "wp_toolset_associations_old". If we check the database, we find out that this table is no more consistent. In fact, the table has an erroneous relationship ID (0), check this screenshot hidden link

So, even after the migration to the new database schema, the migrated data is also erroneous. Check this screenshot hidden link

The relationship ID was also lost. Check this hidden link

We may find out how to fix it without losing any data if you still have a working backup. We can check it and see how we can patch the database to get all the RFG relationships fixed. Let us know if you have it.

Otherwise, we think that we'll need to remove the erroneous entries from the database, remove the RFG and its relationship from the database, then add the RFGs items to the pages manually.

I hope this helps. Let me know if you have any questions.

#1890421
#1892637

Hello Quentin,

Unfortunately, both database backups have rows in the association table that have 0 as the relationship_id. This screenshot is from the 12-06 and also has 0 in the relationship_id hidden link

This leaves us with the manual patching solution. We'll need to remove all the erroneous entries from the database, recreate the relationship, then recreate the RFGs items manually.
- Remove the RFG from the custom fields definition. Drag/drop it to the bottom to remove it.
- Remove entries from "wp_toolset_type_sets" that have the id equals to 0.
- Remove the entry from "wp_toolset_relationships" that has the id equals to 0.
- Remove the entry from "wp_toolset_connected_elements" that the has the element_id equals to 17.

Regarding your second question, the issue should not be reproduced. Please perform the update to Types 3.4 in a staging site and if the issue is reproduced, provide us with the original backup and let us check it.

I'll remain at your disposal.

#1893081

Hello Jamal and thank you for your work.
Too bad for the 2 backups...

That means I let you take care of sending me back a working DDB file?

Sincerely,

Quentin

#1893125

Hello Quentin,

I followed these steps on my local copy and I was able to add a new item of the RFG, and after that, I verified that the "add new item" button of the RFG is also working.
Unfortunately, we don't have a way to recover the old data. So, you will need to enter all the items manually.

I exported the database using Duplicator, you will find the database export and the Duplicator installer file in this folder hidden link

Let me know what you will get.