Support Forum
Support › Meta Box Columns › Issue with complex form and columns
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:
https://i.imgur.com/Aavyjw8.png
https://i.imgur.com/I7CXfvp.png
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!
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.
Hi,
I've just tried your code and this is my screenshot:
Can you guys post the code that includes the heading field?
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!
Hi, I see the bug. I'm debugging it and will fix it as soon as I can.
Thanks Anh!
Regards.
Do we have an estimate as to when this will be updated?
Thanks!
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.
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?
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...
=/
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
Dear Ahn,
I have updated both plugins and now the columns are being built perfectly, however — since I am using the tabbed settings panel + styled as BOXES — every metabox is being rendered inside one another, on a cascade fashion...
Instead of:
[metabox] ... [/metabox]
[metabox] ... [/metabox]
[metabox] ... [/metabox]
I have:
[metabox] ...
[metabox] ...
[metabox] ...
[/metabox]
[/metabox]
[/metabox]
If I set the panel to use NO-BOXES, problem still persists. The content of the second, third and other tabs are not rendered at all. Reverting back to COLUMNS 1.1.0, even with MB 4.13.0 solves the problem.
https://i.imgur.com/PPurdUc.png
https://i.imgur.com/uS2pDcD.png
I will try to reproduce the bug on a clean wordpress install with a simple MetaBox and a simple tabbed settings panel, if it still happens, will post the code here.
Thanks Ahn!
G.
Can you please send me the code of the settings page to test?
Hello Ahn!
I was able to easily reproduce the bug
on a clean/fresh install using just TwentySeventeen theme.
— Latest WORDPRESS
— METABOX latest 4.13.0 version.
— SETTINGS PAGE 1.3.2
— COLUMNS 1.1.0 and/or 1.2.0 (the source of our trouble: breaks the tabbed settings page)
(...and remembering: reverting back to COLUMNS 1.0.0 solves the problem! Try it!)
I did zip my clean TwentySeventeen theme with the code inside
and shared via Google Drive, please get it here:
https://drive.google.com/open?id=1eZLY4F5ZR1KUbHwW9ZFMiZaVr6MsWFJY
Just activate it on a clean WordPress and use the plugins mentioned above.
* FUNCTIONS.PHP ——— loads the settings page (last line: #589)
* BOOT-SETTINGS-PAGE.PHP ——— start the metaboxes and build the tabbed settings
And the folder * /SETTINGS-PAGE/ ——— presents all the files that build every tab and its boxes (I like to do the "include" way, for better and easier organization of each meta box).
Thanks for looking on this!
Looking forward for news!
Regards,
G.
Thanks a lot for your code. I will look at that and fix as soon as I can.