Metabox and Polylang fatal error

Support General Metabox and Polylang fatal error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #48342
    akademia.jakub.mielniczuk@gmail.com[email protected]
    Participant

    Hey! 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.24

    #48347
    PeterPeter
    Moderator

    Hello,

    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/

    #48354
    akademia.jakub.mielniczuk@gmail.com[email protected]
    Participant

    Hey! 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 46

    And 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.

    #48356
    PeterPeter
    Moderator

    Thanks for sharing the details. I will forward it to the development team to check and fix this issue.

    Have a nice day!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.