Skip Navigation

[Resolved] Custom Fields problem …

This support ticket is created 3 years, 6 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
- 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: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Waqar 3 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2104423
Screen Shot 2021-07-01 at 19.33.04.png

I am having trouble with the custom fields on my site.

I went in to add an additional value to one of the fields and when I saved it ... a whole repeating field group disappeared. When I tried re-adding the group, every single field indicated that the slug already existed (so the field group isn't really lost, just inaccessible.

The field group no longer displays when adding a new post either. Posts added before this problem occurred still show the relevent data from that missing product group, you just cant edit any of it anymore.

When I tried importing a backup of the XML file, I get a number of import-errors so I dont understand what is going on there either.

Missing Field Group:
[Field Name] -- [Field Slug]

Product Packaging -- ib-product-packaging (repeating group)
Glass Tile Colorway Name -- ib-glass-tile-colorway-name
Packing Product Size -- ib-packing-product-size
Glass Tile Sheet Size -- ib-glass-tile-sheet-size
Glass Tile Sheet Thickness -- ib-glass-tile-sheet-thickness
Glass Tile Sheets / Box -- ib-glass-tile-sheets-box
Pieces / Box -- ib-packing-pieces-box
Square Feet / Box -- ib-packing-sf-box
Lbs / Box -- ib-packing-lbs-box

in addition, the Performance Test Name field (ib-performance-test-name) seems to fail when rendering line 5711 in the XML file ...

<wpcf-fields-select-option-f232f18a7f2748f633aab852ee4ae0ee-1>
<title>DCOF | DIN 51097</title>
</wpcf-fields-select-option-f232f18a7f2748f633aab852ee4ae0ee-1>

the field has lost it's value parameter ... see attachment for the custom field editor view of the result of this.

this all happened when I added the following item to the select field options:

<wpcf-fields-select-option-eb5531cf41269119c9bc060a86034034-1>
<title>DCOF | ANSI A326.3</title>
<value>ANSI A326.3 | DCOF</value>
</wpcf-fields-select-option-eb5531cf41269119c9bc060a86034034-1>

in my test environment, when I import the XML file (after deleting the custom fields) I get the following import errors:

Types import errors
Relationship "ib-product-packaging" could not be imported. Definition slug already taken.
Relationship "ib-shapes-sizes" could not be imported. Definition slug already taken.
Relationship "ib-colorway" could not be imported. Definition slug already taken.
Relationship "ib-performance-tests" could not be imported. Definition slug already taken.

So I have no idea what is going on here ... but I need help trying to resolve it.

I have uploaded the export archive for yall to look at ... it is located here:

hidden link

Hope you will be able to help me diagnose and fix this issue.

thx

Gordon

p.s. when I try importing the xml file, it shows me a ton of long ago deleted fields ... why are they still present in the custom field group if they were deleted? (some are typos, missing letters, or have numbers before them.

#2104569

Hi Gordon,

Thank you for contacting us and I'd be happy to assist.

From your message, I understand that the custom field data is still available in the database, but, the fields are not showing in the field group.

To troubleshoot this, I'll need access to the website's admin area to see how the custom field groups are set up.

I'll also need your permission to create and download a clone/snapshot of the website, to investigate this on a different server.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#2105105

oops ... selected the wring ticket

#2105107

accidentally marked this one as resolved. It is not resolved yet

#2106563

Thanks for writing back.

The admin access details are removed from the thread automatically once it is marked as resolved, so I couldn't log in to your website's admin area.

However, I was able to import the data from your export file, without any errors or warnings on a test website.

I noticed that the "Product Loader" custom field group not only consists of a lot of custom fields, but some of those fields also have very long field names, slugs, and description text.

This means that whenever any change is made to this custom field group, a lot of information needs to be processed by the server in one go. We've seen some similar reports about this issue where increasing the server's "PHP max input variables" and "PHP post max size" values fixed this.

If you'll go to WP Admin -> Tools -> Site Health -> Info -> Server, you'll see the current "PHP max input variables" and "PHP post max size" values. You can increase both these to higher values, for example, 4000 and 32M respectively.

But this is only a temporary fix and a more efficient and long term solution would be:

1. Making sure to keep short names and slugs in the fields in custom fields groups, and
2. And even if you need to store many custom fields with an individual post type, it is a good idea to distribute them in multiple custom field groups, instead of registering them all through a single custom field group.

This means that you can distribute the fields in the "Product Loader" field group into multiple field groups so that they are all not in the same field group.

You can restore your website's backup from an earlier date (before this issue started) and then follow these recommendations to avoid a similar issue again.

I hope this helps and please let me know if you need any further assistance around this.