Custom Fields
Re-Envisioned
Support Meta Box Group BUG max_status ignored

This topic contains 2 replies, has 2 voices, and was last updated by  Alexander Krosnowski 1 year, 4 months ago.

  • Creator
    Topic
  • #10213

    While using the field image_advanced inside a group, the max_status = false is ignored.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #10236

    Anh Tran
    Keymaster

    Looks like this happens only when you create the field with Meta Box Builder, doesn’t it? I can replicate the bug with the builder. With pure code, it works.

    #10241

    I have not yet embraced the builder, I only use it to figure out, “pure code” when the docs are not clear to me.

    The array is posted below and here is the full code: https://pastebin.com/9HDWnjmU.

    I think, but I have not tested it, the issue has to do when an image field is wrapped in a tab and/or group. It’s also possible that it’s tied to another BUG I found with tabs and groups. On a settings page I defined 3 tabs and under tab 3 I have several meta boxes. Although each meta box had a unique ID and all the values were saved to the db under the unique array key (as it should) if another meta box had a matching field ID, the ‘std’ => array (‘yes’) for an options list only worked on the last instance of ‘std’.

    To recreate that bug, create a tab, assign two or more meta boxes to the tab, in each meta box create a button group (i.e., a Yes/No button) and set the selected value to ‘no’. Keep the button group ID same for the button group in each unique meta box. The result is the last button group will be the only one that has a default option selected.

    Otherwise, max_status works, when it’s not a tab or group.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.