Forum Replies Created
-
AuthorPosts
-
December 4, 2024 at 8:06 PM in reply to: "The above error occurred in the component" when loading a registered block #47102
Cédric Dagherir
ParticipantEdit: I have this in
index.php?rest_route=%2Fwp%2Fv2%2Fblock-renderer%2Fmeta-box%2Fquote&context=edit&post_id=8&_locale=user:rendered : "<div id=\"mb-block-quote\" class=\"wp-block-meta-box-quote\" >\r\n\r\n\t<div class=\"quote-content\">\r\n\t\t<div class=\"quote_content\"></div>\r\n\t\t<div class=\"quote_author\"></div>\r\n\t\t<div class=\"quote_positon\"></div>\r\n\t</div>\r\n\r\n\t<div class=\"quote_avater\">\r\n\t\t<img class=\"quote__image\" src=\"\">\r\n\t</div>\r\n\r\n</div>"December 4, 2024 at 7:59 PM in reply to: "The above error occurred in the component" when loading a registered block #47101Cédric Dagherir
ParticipantHi,
I switched to twentytwentyfour, only adding :
require_once(__DIR__ . '/blocks/quote/function.php');in functions.php,I managed to update to WordPress latest version, also MetaBox and MB Blocks latest version. Since it's Bedrock I originally use :
composer require meta-box/mb-blocks(i used dev:master, and also tried to do via copying the files directly to plugins)
composer require wpackagist-plugin/meta-boxAll is installed correctly, I deactivated all other plugins. I run WP 6.7.1, have MetaBox 5.10.4 & MB Blocks 1.7.3.
Now everything is ok on front, but in editor, even if I can edit the attributes, I have an infinite loader for the rendering of the gutenberg block. No errors in Network nor Console.

Here's what I have in the 200 response for content :
<!-- wp:template-part {"slug":"header","area":"header","tagName":"header","theme":"twentytwentyfour"} /--> <!-- wp:group {"tagName":"main"} --> <main class="wp-block-group"> <!-- wp:group {"layout":{"type":"constrained"}} --> <div class="wp-block-group"> <!-- wp:spacer {"height":"var:preset|spacing|50"} --> <div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:post-title {"textAlign":"center","level":1} /--> <!-- wp:spacer {"height":"var:preset|spacing|30","style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} --> <div style="margin-top:0;margin-bottom:0;height:var(--wp--preset--spacing--30)" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:post-featured-image {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} /--> </div> <!-- /wp:group --> <!-- wp:post-content {"lock":{"move":false,"remove":true},"layout":{"type":"constrained"}} /--> </main> <!-- /wp:group --> <!-- wp:template-part {"slug":"footer","area":"footer","tagName":"footer","theme":"twentytwentyfour"} /-->Everything should properly work but it doesn't. Thanks for your time !
AntoineCédric Dagherir
ParticipantHi, I have the same issue here. I have an array in my API response like this :
`"AdditionalLocations": [
{
"Address": "GERS FRA",
"Location": "Gers",
"LocationId": "FR_DEP_32",
"AddressDetails": {
"City": "",
"Line1": "",
"Line2": "",
"State": "GERS",
"Country": "FRA",
"PostalCode": ""
}
},
{
"Address": "LANDES FRA",
"Location": "Landes",
"LocationId": "FR_DEP_40",
"AddressDetails": {
"City": "",
"Line1": "",
"Line2": "",
"State": "LANDES",
"Country": "FRA",
"PostalCode": ""
}
},
{
"Address": "LOT-ET-GARONNE FRA",
"Location": "Lot-et-Garonne",
"LocationId": "FR_DEP_47",
"AddressDetails": {
"City": "",
"Line1": "",
"Line2": "",
"State": "LOT-ET-GARONNE",
"Country": "FRA",
"PostalCode": ""
}
},
{
"Address": "PYRÉNÉES-ATLANTIQUES FRA",
"Location": "Pyrénées-Atlantiques",
"LocationId": "FR_DEP_64",
"AddressDetails": {
"City": "",
"Line1": "",
"Line2": "",
"State": "PYRÉNÉES-ATLANTIQUES",
"Country": "FRA",
"PostalCode": ""
}
},
{
"Address": "HAUTES-PYRÉNÉES FRA",
"Location": "Hautes-Pyrénées",
"LocationId": "FR_DEP_65",
"AddressDetails": {
"City": "",
"Line1": "",
"Line2": "",
"State": "HAUTES-PYRÉNÉES",
"Country": "FRA",
"PostalCode": ""
}
}
],`I need these to be in metas of my CPT. I then created all the metas, and this is what i have for AdditionalLocations :
array( 'id' => 'AdditionalLocations', 'name' => 'AdditionalLocations', 'type' => 'group', 'clone' => true, 'fields' => [ [ 'id' => 'Address', 'name' => 'Address', 'type' => 'text' ], [ 'id' => 'Location', 'name' => 'Location', 'type' => 'text' ], [ 'id' => 'LocationId', 'name' => 'LocationId', 'type' => 'text' ], [ 'id' => 'AddressDetails', 'name' => 'AddressDetails', 'type' => 'group', 'fields' => [ [ 'id' => 'City', 'name' => 'City', 'type' => 'text' ], [ 'id' => 'Line1', 'name' => 'Line1', 'type' => 'text' ], [ 'id' => 'Line2', 'name' => 'Line2', 'type' => 'text' ], [ 'id' => 'State', 'name' => 'State', 'type' => 'text' ], [ 'id' => 'Country', 'name' => 'Country', 'type' => 'text' ], [ 'id' => 'PostalCode', 'name' => 'PostalCode', 'type' => 'text' ], ] ] ] ),If I don't put a group the value I get is "Array". If I don't put 'clone' I don't have any issues but it won't register the values correctly... I need clone to be there as I may have several AdditionalLocations in my API response, but here's the error code I get :
Warning: foreach() argument must be of type array|object, string given in C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box-group\group-field.php on line 220 Fatal error: Uncaught TypeError: RWMB_Clone::html(): Argument #1 ($meta) must be of type array, string given, called in C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\field.php on line 33 and defined in C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\clone.php:6 Stack trace: #0 C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\field.php(33): RWMB_Clone::html('Array', Array) #1 C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\field.php(535): RWMB_Field::show(Array, true, 8519) #2 C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\meta-box.php(212): RWMB_Field::call('show', Array, true, 8519) #3 C:\wamp64\www\website-tai-new\src\web\wp\wp-admin\includes\template.php(1456): RW_Meta_Box->show(Object(WP_Post), Array) #4 C:\wamp64\www\website-tai-new\src\web\wp\wp-admin\edit-form-advanced.php(714): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post)) #5 C:\wamp64\www\website-tai-new\src\web\wp\wp-admin\post.php(206): require('C:\\wamp64\\www\\w...') #6 {main} thrown in C:\wamp64\www\website-tai-new\src\web\app\plugins\meta-box\inc\clone.php on line 6I use MetaBox 5.9.2 and MetaBox Group Version 1.3.18 for info.
Cédric Dagherir
ParticipantHi, I have to re-up this issue as I'm facing the same problem : my settings are correctly set, I have Elementor 3.17.3, Elementor Pro 3.17.1, Mb Settings Page 2.1.11; Meta Box 5.8.2 & Meta Box Elementor Integrator 2.1.10 installed.
When I click on dynamic field I can choose a Meta Box Field, I can go to "Settings" but the select is empty for the fields...
Thank youSeptember 18, 2023 at 4:19 PM in reply to: mb_get_block_field() in preview when storage = post_meta #43266Cédric Dagherir
ParticipantThanks Peter, it's working 🙂
Maybe you should complete the documentation with this information.
February 9, 2023 at 8:11 PM in reply to: ✅Block doesn't render on editor unless I fill some field data #40461Cédric Dagherir
ParticipantHi !
Did you integrate or plan to integrate this feature ?
Thanks
June 20, 2022 at 6:03 PM in reply to: ✅Block doesn't render on editor unless I fill some field data #36589Cédric Dagherir
ParticipantHi ! Thanks for your whole work 🙂
I need this feature too. Thanks.
September 17, 2019 at 9:03 PM in reply to: ✅Private $user_id and $config causes bugs in rwmb_profile_before_save_user #16178Cédric Dagherir
ParticipantOK. Thank you Tran for that and your work !
September 17, 2019 at 4:18 PM in reply to: ✅Private $user_id and $config causes bugs in rwmb_profile_before_save_user #16171Cédric Dagherir
ParticipantHi Tran,
OK thanks. I use AIO, which dont include the 1.4.2... Would you update User Profile in the AIO in the next days ?
-
AuthorPosts