MB Blocks regression: nested instances of the same block render issue
- This topic has 5 replies, 2 voices, and was last updated 5 days, 10 hours ago by
Emiliano García.
-
AuthorPosts
-
April 27, 2026 at 5:27 PM #49931
Emiliano García
ParticipantPlugin: Meta Box AIO (current version, with MBBlocks\Loader::prepare_render_callback_data).
Last known working version: Meta Box AIO 1.23.1.
Stack: WordPress + WooCommerce + WooCommerce Subscriptions, PHP 8.x.Bug:
When several instances of the same custom MB block are nested inside other MB blocks (a layout structure like meta-box/section > meta-box/row > meta-box/column > meta-box/plan-tab, with 4 different plan-tab instances inside 4 different columns), all rendered plan-tab instances output the data of the FIRST one. The same block at the top level of the post content renders correctly. The bug only triggers when the block is wrapped inside <InnerBlocks /> of a parent MB block.Block setup (relevant):
Blocks registered via add_filter('rwmb_meta_boxes', ...) with 'type' => 'block', fields, and 'render_template' => dirname(__FILE__) . '/template.php'.
Templates read $attributes['data'] directly. Some also use mb_get_block_field(). Both return the wrong data in the nested case.
Reproduction:Register section, row, column blocks whose templates output <InnerBlocks />.
Register a child block (e.g. plan-tab) with several text fields.
In a page, add: section > row > 4 × (column > plan-tab), each plan-tab with different field values.
Frontend: all 4 plan-tabs display the data of the first.April 28, 2026 at 9:25 AM #49933Peter
ModeratorHello Emiliano,
Thanks for reaching out.
I've tried to reproduce the issue on my site but did not see that: many instances of an inner block inside a custom block, all of inner blocks are displayed properly.
Can you please share the code that you use to register the custom fields, blocks, template files and let me know how to reproduce the issue?
April 29, 2026 at 2:26 PM #49934Emiliano García
ParticipantThis is how I define the blocks and incorporate them into my theme; this happens on several pages with the same structure
https://drive.google.com/drive/folders/1-3biFWKtBySQN0fib335e8JhaNMaxome?usp=sharing
April 29, 2026 at 8:49 PM #49937Peter
ModeratorHello Emiliano,
Thank you for sharing the blocks. I can see the issue with the following format:
- Section
-- Row > A custom inner block
-- Row > A custom inner block
-- Row > A custom inner blockthen 3 custom inner blocks display the same content in the frontend as the first inner block.
I've escalated the issue to the development team to check and fix this. I will let you know when it's done.
May 1, 2026 at 7:52 PM #49945Emiliano García
ParticipantThank you! I need to revert to version 3.5.0 to avoid this bug.
May 6, 2026 at 6:54 PM #49953Emiliano García
ParticipantAny news?
-
AuthorPosts
- You must be logged in to reply to this topic.