Skip Navigation

[Resolved] Database Questions

This support ticket is created 5 years, 1 month 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1362589

Could you clarify a couple things regarding database content please?

Firstly, I've noticed that in the postmeta tables, the values for meta_key _wp_types_group_templates is either all or just a varying number of commas. I find the commas a bit odd! What do they mean please?

Secondly, I've noticed that even when I completely remove one or more custom fields, they're not cleared from the serialized data (meta_key is _cred_extra) for any forms that exist for the post type they were originally assigned to. Is this expected?

Thanks

#1363005

Hi, I don't personally know the answers to these questions but I have asked my 2nd tier team if they have that information available. Hopefully I'll have some feedback tomorrow.

#1364967

Okay I have some answers.

Firstly, I've noticed that in the postmeta tables, the values for meta_key _wp_types_group_templates is either all or just a varying number of commas. I find the commas a bit odd! What do they mean please?
The value should be either "all" or a comma-surrounded and comma-separated list of Content Template slugs where the corresponding Field Group should appear, like this:

,unassigned-temp,guest-pages,pages,

If you're seeing all commas and no slugs, then that could be a result of data corruption or a bug in import/export that was resolved in a previous version of Types. Regardless, it behaves essentially the same as "all" though somewhat less performant. If you want to clean those up you can edit the corresponding field group in wp-admin (the field group numeric ID is post_id in the postmeta table), Click "Edit" in the "Appears On" setting, and check one checkbox that is currently unchecked. Save the Field Group, then edit it again and uncheck that checkbox you just changed. The values for this field group should update properly in the database. If they don't we can take a closer look.

I've noticed that even when I completely remove one or more custom fields, they're not cleared from the serialized data (meta_key is _cred_extra) for any forms that exist for the post type they were originally assigned to. Is this expected?
Yes, until the Form is saved again without the deleted custom field, the deleted custom field information will remain in the serialized data structure. If you resave the Form without the field in the form contents, the serialized data structure will be updated to remove the deleted field.

#1367567

Hi christian

thanks for this information. I've followed your instructions and the commas have now been cleaned up and the serialized data no longer contains the previously deleted fields.

Just one last question; since I needed to save the post forms again to clean up the serialized data after deletion of custom fields, do I need to re-save affected forms when new custom fields are ADDED to a post type (in order to add the new fields to the serialized data)?

#1367797

There's no need to add the new fields to the serialized data unless you also add those fields in the Form builder. In that case, yes, you would resave the Form. Otherwise no, it's not necessary.

#1368819

My issue is resolved now. Thank you!