Custom Fields
Re-Envisioned
Support Meta Box Columns Issue with complex form and columns

  • Creator
    Topic
  • #7712
    si2info
    Participant

    Hi,

    I’ve an issue when I do a complex form that include ‘Metabox Group’ and ‘Metabox Columns’ (and ‘Metabox Frontend Submision’ too).

    I’m triying to do a group with five fields like this:

    Code:

    array(
          'type' => 'group',
          'id' => 'mygroup',
          'name' => __('My group name','textdomain'),
          'fields' => array(
            array(
              'id' => 'id1',
              'name' => __('ID1','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id2',
              'name' => __('ID2','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id3',
              'name' => __('ID3','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id4',
              'name' => __('ID4','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
            array(
              'id' => 'id5',
              'name' => __('ID5','textdomain'),
              'type' => 'number',
              'columns' => 2,
            ),
          ),
          'columns' => 12,
    ),

    In theory, this should print a row with 5 columns, each column of 2/12, but its print a row of three columns and two columns after, breaking all HTML form.

    I think that this happens because the plugin Metabox Columns close two divs in the same time, when it shouldn’t.

    Captures:

    View post on imgur.com

    View post on imgur.com

    This issue was happen in other times with ‘divider’ and ‘heading’ fields types and i fixed it deleting this fields. I read all documentation about this plugins but I haven’t found other solution for the moment.

    Thank you so much.
    Regards!

Viewing 10 replies - 1 through 10 (of 16 total)
  • Author
    Replies
  • #7718
    Teia Local Studio
    Participant

    Yes!
    I second that.

    I have a SETTINGS PAGE with tabs and, with the most recent META-BOX-COLUMNS (Version 1.1), the HTML completely breaks up.

    If I turn off the META-BOX-COLUMNS Version 1.1, problem disappears.
    If I revert back to META-BOX-COLUMNS Version 1.0.0, problem gets solved.

    Or, as mentioned on the topic already, if I do remove all my fields (or some of my fields) of type “HEADING”, problem is gone as well.

    So, definitely we have strange a conflict between MB-COLUMNS Version 1.1 and HEADING fields.

    Regards,
    G.

    #7724
    Anh Tran
    Keymaster

    Hi,

    I’ve just tried your code and this is my screenshot:

    View post on imgur.com

    Can you guys post the code that includes the heading field?

    #7727
    si2info
    Participant

    Hi, of course!

    I uploaded (temporally) the complete metabox form here:
    https://github.com/Flewps/metaboxproblem/blob/master/dano-cerebral.php

    (This is one of many ‘metabox’ that I load in this project. This is the reason that because it’s return an array and isn’t into a wordpress ‘rwmb_meta_boxes’ hook (I do this after load all)).

    In this case, the problem isn’t the heading field (I think), it’s a group with more of three fields. It’s posible that the problem is when Metabox Columns, and their column counter, decide that field is the last of the row and close the column and the row before the time. And this happens in heading, divider and groups fields, far as I know.

    Thank you!

    #7739
    Anh Tran
    Keymaster

    Hi, I see the bug. I’m debugging it and will fix it as soon as I can.

    #7744
    si2info
    Participant

    Thanks Anh!

    Regards.

    #7893
    toddmckee
    Participant

    Do we have an estimate as to when this will be updated?

    Thanks!

    #7903
    Anh Tran
    Keymaster

    Hi,

    Sorry for taking long. While working with this issue, we found that it’s harder than we thought. We’re trying to fix this. Hopefully early next week we can finish.

    Thanks for understanding.

    #7939
    Anh Tran
    Keymaster

    Hi,

    We’ve been working on this bug and completed rewrite the logic. Our tests run well. However, we want to test more before releasing. So @toddmckee can you please posts your code here for testing?

    #8016
    Teia Local Studio
    Participant

    Well…

    For me the problem was not solved.
    Matter of fact, on version 1.1.0, the settings panel (using tabs) got completely broken.
    Now, on version 1.2.0, the settings panel are working fine, but simply there are no columns applied at all. Seems like to have no plugin active.

    I will try to post my code, but my settings panel is huge, a lot of files included and lots code…

    =/

    #8027
    Anh Tran
    Keymaster

    Hi guys,

    I’ve just pushed the new versions for both Meta Box and Columns extensions. Please update and let me know if you still see the bug.

    Thanks,
    Anh

Viewing 10 replies - 1 through 10 (of 16 total)
  • The topic ‘Issue with complex form and columns’ is closed to new replies.

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash