Support Forum » User Profile

Forum Replies Created

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • in reply to: Extra blank row being saved to database #11788
    Lisa TallyLisa Tally
    Participant

    Yes, that seems to have taken care of it. Thanks!

    in reply to: Extra blank row being saved to database #11759
    Lisa TallyLisa Tally
    Participant

    I believe the answer is yes.

    • I have enabled MB revision via AIO.
    • My custom post type `'supports' => array(
      'title',
      'revisions',
      ),`
    in reply to: Bug: Checkboxes saved in custom table but shown in UI #11758
    Lisa TallyLisa Tally
    Participant

    Custom 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)

    Lisa TallyLisa Tally
    Participant

    Thanks, the revisions are now being saved. I'll post back here if I encounter any issues implementing it.

    in reply to: Custom Table with Group fields #11573
    Lisa TallyLisa Tally
    Participant

    Well, 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.

    in reply to: Custom Table with Group fields #11572
    Lisa TallyLisa Tally
    Participant

    I 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.

    Lisa TallyLisa Tally
    Participant

    That 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!

    Lisa TallyLisa Tally
    Participant

    Great. I look forward to the update.

    Lisa TallyLisa Tally
    Participant

    I 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;
    }
Viewing 9 posts - 16 through 24 (of 24 total)