Forum Replies Created
-
AuthorPosts
-
Lisa Tally
ParticipantYes, that seems to have taken care of it. Thanks!
Lisa Tally
ParticipantI believe the answer is yes.
- I have enabled MB revision via AIO.
- My custom post type `'supports' => array(
'title',
'revisions',
),`
October 25, 2018 at 8:56 PM in reply to: ✅Bug: Checkboxes saved in custom table but shown in UI #11758Lisa Tally
ParticipantCustom Fields:
https://ghostbin.com/paste/db3h9
To recreate:
1. Fill out all the fields for a new benefit.
2. Save/Publish
3. The page reloads
4. All fields have saved successfully and are displayed correctly in the UI
5. Change the public description of the benefit
6. Save/Publish
7. The page reloads
8. The checkboxes are no longer checked (but the database does still hold the values)October 19, 2018 at 1:13 AM in reply to: ✅MB Revisions in combination with MB Custom Table and Custom Post Type #11667Lisa Tally
ParticipantThanks, the revisions are now being saved. I'll post back here if I encounter any issues implementing it.
Lisa Tally
ParticipantWell, I am not exactly sure what happened, but I basically started over:
- deleted the custom table from the database
- exported the metabox
- unpublished the non-working metabox
- imported the metabox (I got an error here: "Cannot load meta-box-import." but I clicked "back" and the import actually succeeded, so I continued.)
- added test data to a page
- ALL saved successfully...
Weird, but I'm happy! If you want to know more details just reach out.
Lisa Tally
ParticipantI created a more simple test and had success saving a single text field contained in a group. So now I wonder if there's something else going on.
Test Case:
group (id: group)
-text (id: text)Code:
MB_Custom_Table_API::create( "{$prefix}testing", array( 'group' => 'TEXT NOT NULL' ) );Setting that group to cloneable (to emulate the design of my production meta box has no affect on saving the data successfully - a good thing!)
I'm continuing to look into this.
October 8, 2018 at 8:40 PM in reply to: ✅Adding a Group causes an warning: Argument #2 should be an array #11570Lisa Tally
ParticipantThat seems to have worked. I will let you know if I experience any issues using it in production, but thank you for your quick reply and fix!
October 5, 2018 at 7:41 PM in reply to: ✅Adding a Group causes an warning: Argument #2 should be an array #11547Lisa Tally
ParticipantGreat. I look forward to the update.
October 4, 2018 at 7:15 PM in reply to: ✅Adding a Group causes an warning: Argument #2 should be an array #11538Lisa Tally
ParticipantI am using all the default settings. By simply placing an empty group in the Fields area I get the error.
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array ( 'title' => 'Test Box', 'id' => 'test-box', 'post_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( ), ); return $meta_boxes; }(Looking closer at the code above I see that an empty group is not even output into the Code tab.)
Even with a more realistic example (a group with a field inside it), I still get the error.
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' ); function your_prefix_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = array ( 'title' => 'Test Box', 'id' => 'test-box', 'post_types' => array( 'page', ), 'context' => 'normal', 'priority' => 'high', 'fields' => array( array ( 'id' => 'group_2', 'type' => 'group', 'name' => 'Group', 'fields' => array ( 0 => array ( 'id' => 'text_2', 'type' => 'text', 'name' => 'Text Field', ), ), 'default_state' => 'expanded', ), ), ); return $meta_boxes; } -
AuthorPosts