Support Forum
Support › Meta Box Builder › Bug Report: Click twice on update, all custom fields are lost
Hey there!
I usually create all my MetaBoxes through code but decided to give the builder a try.
First of all, great job overall it's extremely comfortable and faster than going through manual coding of all the fields. However there are a few shortcomings:
- There is no collapse all/expand all control in the fields list, making it hard to navigate through fields if you forget to collapse as you create them.
- There is no support for entering callbacks functions as needed (i.e. for default values or multiple choice options)
Then, I found a bug which is quite bad. I clicked on update, and then realised I had to change something else, then clicked update again. When the browser stopped loading all my field group settings and all the fields were gone. There are no posts revisions enabled so I can't recover them.
If you start from a group that has data and update before the fields complete loading, I'm afraid the system as it is will wipe all out. There should be some failsafe, or at least posts revision so we can restore a previous version.
I hope this helps improving the builder!
Thanks,
Mauro.
Hi Mauro,
1. There is no collapse all/expand all control in the fields list, making it hard to navigate through fields if you forget to collapse as you create them.
Thanks for your feedback. There is no option to collapse/expand all fields in the builder. I'm going to inform the developer team to consider adding it to the to-do list for the future development of the plugin.
2. There is no support for entering callbacks functions as needed (i.e. for default values or multiple choice options)
If you use the choice/select field, you can add callback: function_name
to the choice list to use the callback function to create the list.
3. Regarding the issue click twice on the update button, I'm able to reproduce it on my local site. I've escalated this bug to the development team to fix it in the next update.
Thanks for the quick reply!
Regarding (2), what I meant is that it would be great to be able to put the actual callback function code someplace in the builder. Perhaps a new CPT that allows to enter php and then have a select in the fields that support callbacks.
I know eval is evil etc, perhaps it’s possible to build a disk-based solution that takes the code from the DB and keeps it up to date with a files storage solution.
There is also a limit in specifying some defaults, specifically in the date and date time fields, whereas I.e. you can’t default to today in the builder because the php one liner can’t be put in the field.
The whole point is to have a self contained solution in the builder that is also exportable and can be imported and kept up to date from a development environment to a live environment.
On a separate note for the sake of version control I think having an option to enable posts revisions on every MB CPT would be a nice thing to have.
Hi Mauro,
Please follow this topic to increase the PHP settings on your server https://stackoverflow.com/questions/27138764/adding-max-input-vars-3000-to-my-htaccess-file-and-php-ini-not-working
Then re-check this issue. Let me know how it goes.