Metabox and Polylang fatal error
- This topic has 3 replies, 2 voices, and was last updated 6 hours, 14 minutes ago by
Peter.
-
AuthorPosts
-
May 30, 2025 at 7:48 PM #48342
[email protected]
ParticipantHey! I have just updated Metabox AIO to v2.2 and got error with polylang. Here's error code:
Fatal error: Uncaught TypeError: MBB\Integrations\Polylang\Relationship::register_side_strings(): Argument #2 ($data) must be of type array, string given, called in #16 {main} thrown in /becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Integrations/Polylang/Relationship.php on line 46
Polylang version: 3.7
Theme: Bricks 1.24June 1, 2025 at 11:06 PM #48347Peter
ModeratorHello,
Can you please share the full error trace in the debug log? If you know how to reproduce the issue with clear steps, please let me know how to do that. I will try to reproduce the issue on my demo site and investigate it.
Refer documentation https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
June 2, 2025 at 7:53 PM #48354[email protected]
ParticipantHey! here's debug log from debug.log file
[02-Jun-2025 12:44:17 UTC] PHP Fatal error: Uncaught TypeError: MBB\Integrations\Polylang\Relationship::register_side_strings(): Argument #2 ($data) must be of type array, string given, called in /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Integrations/Polylang/Relationship.php on line 41 and defined in /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Integrations/Polylang/Relationship.php:46
Stack trace:
#0 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Integrations/Polylang/Relationship.php(41): MBB\Integrations\Polylang\Relationship->register_side_strings('to', 'product', 'Meta Box Relati...')
#1 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/class-wp-hook.php(324): MBB\Integrations\Polylang\Relationship->register_strings(Array, Object(WP_Post))
#2 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#3 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/modules/relationships/src/Register.php(78): apply_filters('mbb_relationshi...', Array, Object(WP_Post))
#4 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/class-wp-hook.php(324): MBB\Relationships\Register->register_relationships('')
#5 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#6 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-relationships/inc/loader.php(69): do_action('mb_relationship...')
#8 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/class-wp-hook.php(324): MBR_Loader->init('')
#9 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#10 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#11 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-settings.php(727): do_action('init')
#12 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-config.php(91): require_once('/home/klient.dh...')
#13 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-load.php(50): require_once('/home/klient.dh...')
#14 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-admin/admin.php(35): require_once('/home/klient.dh...')
#15 /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-admin/index.php(10): require_once('/home/klient.dh...')
#16 {main}
thrown in /home/klient.dhosting.pl/kulagasyn/dev-site.becompleat.pl/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/Integrations/Polylang/Relationship.php on line 46And actually i have managed to solve this issue. I have turned off polylang, make my relationships as drafts and then turned on polylang. Then changed each relationship to 'published' - and it works.
June 2, 2025 at 10:42 PM #48356Peter
ModeratorThanks for sharing the details. I will forward it to the development team to check and fix this issue.
Have a nice day!
-
AuthorPosts
- You must be logged in to reply to this topic.