Support › Meta Box AIO › Disappearing custom post fields
i have encountered a severe problem with the custom fields group.
I have a CPT called reviewers. I created a custom field group for the CPT. This has been an ongoing process. I have been adding various fields over the last few weeks.
Then over the weekend when I opened my CPT it said there were no fields and I assumed that the field group had lost the link to the specific CPT. When I looked at the Field group there were NO fields listed. Fortunately, I had a backup so I could export the field group file and import it into the live site and I recovered everything except about 5 hours of work.
So yesterday morning started redoing the newly added fields and after about two hours of work, I duplicated a field group type "group" when I renamed the id and saved it lost all of the fields again.
This is now the cond time in 24 hours it happened. I had to restore the backup as this is an active site with data required.
Once I restored the working field group the bata showed again. I need to have this figured out as I keep losing data.
The site is https://events.saalt.org.za/
and I am prepared to give you temp admin access to investigate I have tried to replicate the error but I don't know when it will happen again, however twice in one day is a problem
Can you please export the field group to a JSON file and share it here? I will try to import it to my local site and observe if the issue happens.
How do i share it here? i don't see any upload options
You can upload it to Google Drive or Dropbox and share the link here.
Here it is.
Hi Sorry not myself today
OK i did figure it out here is the proper link:
After importing the field group to my local site, assigning it to a CPT and adding some field value to a post, I do not see any issue. But I see there are two fields that have the same ID (mbpf_reviewer_group_info) and the option format of some choice fields is not followed the suggested.
I'm not sure why the issue happens on your site, I think you can try:
- Increase PHP setting
max_input_vars, following the documentation https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/
- Set each field with a unique ID
- Set the choice options following the format:
value: Label. The value should be in lowercase with alphabet characters and underscores.
teach_learn: Language preservation and revitalization with special reference to teaching and learning
It happened again. i implemented all your suggested changes ,
changed the id's to be all unique
I bumped up the max inputvars to 100000 as it was on 10000.
I changed all my options fields to "Value: label" formats as commented
and after I saved I lost all the fields again.
I did save as I was making the changes and right at the end when I wanted to continue with the developing work all the fields were gone again. This is now the 5th time this happened.
We really need to address this at a very high level. My time lost is now already 14 hours of work that has disappeared.
I have not restored the field group so you can see what has happened.
I can grant you access to this site to see what is wrong.
Please can we consider this urgent I need to finish this as the client is getting edgy?
Please share your site credentials via this contact form https://metabox.io/contact/
and a screen record of the issue. I will take a look.
I am encountering the same issue as Pat. I was renaming my Custom Post Group Name Title without touching the ID but my CPTs went missing, but the DB still saves the data.
This is a bit frustrating as it happened to me a few times while renaming the title, has the problem been resolved?