Custom Fields | Location Reset after 50 Fields
- This topic has 6 replies, 3 voices, and was last updated 1 year, 5 months ago by
Unakriti.
-
AuthorPosts
-
May 23, 2024 at 4:49 PM #45504
Unakriti
ParticipantHi Support,
I am adding custom fields and have assigned these to a Settings Page. However, when the number of custom fields exceed (say) 48-50, the configuration of Custom Fields -> Settings -< Locatoin is reset automtically.
With this issue, from the desired Location of Settings page - Settings About, the config goes back to default and I lose all the display on the frontend. I then have to manually update the config.
Is this a bug or am I missing anything?
Kind regards,
May 24, 2024 at 10:28 PM #45523Peter
ModeratorHello,
You can try to follow this tutorial to increase the PHP setting
max_input_varsto fix the issue
https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/Let me know how it goes.
May 25, 2024 at 9:49 PM #45540Unakriti
ParticipantThank you Peter,
I am not sure that link you shared about WordPress Custom Fields Not Saving? Increase max_input_vars! is relevant.
Actually, the fields save okay but the Location attribute is reset when the number of fields go above 50 or so. Location is reset to Posts - Post. Please refer to the screenshot here - https://imgur.com/a/gXa4rqD
To fix this, I have to manually re-select the appropriate CPT. But after adding one or more fields, the error recurs.
Do you think its an issue with the PHP max_input-vars ? Or am I missing something?
Kind regards,
May 27, 2024 at 10:31 PM #45551Peter
ModeratorHello,
Is there any chance you follow the suggestion to increase the PHP setting and check the issue again?
The field group in the builder is a post type so it is affected by the PHP setting
max_input_vars. You can refer to this topic
https://support.metabox.io/topic/after-edit-custom-field-group-only-applies-to-posts/#post-43114May 28, 2024 at 2:56 PM #45555Unakriti
ParticipantThanks Peter.
In the interet of time for my client, to bypass this limitation, I simply created a separate (part II) set of custom fields. It works this way and so I can clearly see the reasoning / logic you offered.
PS: I will try increasing the PHP max_input_vars value next time.
Appreciate your support,
July 6, 2024 at 7:23 AM #45840David Nickson
ParticipantUnakriti, did you try increasing the max input vars and if so, did it fix the problem?
I'm in the same boat here, I have increased the max input vars but still not working for me.
July 6, 2024 at 12:06 PM #45842Unakriti
Participant@David, I haven't had a chance to try this again, yet. In the interest of time for my client, I simply split the total by creating a second and a third set of custom fields to keep the total below 50 (per set).
Hope it helps.
-
AuthorPosts
- You must be logged in to reply to this topic.