Latest plugin update throws fatal error

Support Meta Box AIO Latest plugin update throws fatal error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #50200
    FabianFabian
    Participant

    Hello,

    The latest MB AIO update causes this fatal error on a client site:

    [STDERR] PHP Fatal error: Uncaught TypeError: RWMB_Helpers_String::sanitize_id(): Argument #1 ($id) must be of type string, null given, called in /home/xxx/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/meta-box.php on line 327 and defined in /home/xxx/public_html/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/helpers/string.php:23

    #50203
    PeterPeter
    Moderator

    Hello Fabian,

    Thank you for reaching out.

    This is a very weird issue. It looks like a field group (meta box) on the site is registered with null id. For example:

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
        $meta_boxes[] = [
            'title'      => 'Event details',
            'post_types' => 'post',
            'id'         => null, // this causes the error
            'fields'     => [
                ...
            ],
        ];
    
        return $meta_boxes;
    } );
    

    Can you please recheck all the field groups registered on the site if one has null ID?

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