Error when update under Bricks Builder!

Support General Error when update under Bricks Builder!

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #48817
    m.stefano@digitaldomain.it[email protected]
    Participant

    I'm updating many sites and they all give me this problem, I'm inserting the contents of the email with the error report, I hope it will be useful for debugging.

    Versione di WordPress 6.8.2
    Tema attivo: Bricks Child Theme (versione 1.1)
    Plugin corrente: Meta Box AIO (versione 3.0.1)
    Versione PHP 8.2.29

    Dettagli dell'errore
    ====================
    Un errore di E_ERROR è stato causato nella linea 214 del file /var/www/mydomain.it/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php. Messaggio di errore: Uncaught Error: Failed opening required '/var/www/mydomain.it/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/templates/media.php' (include_path='.:/usr/share/php') in /var/www/mydomain.it/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php:214
    Stack trace:
    #0 /var/www/mydomain.it/htdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/image-advanced.php(79): RWMB_Media_Field::print_templates()
    #1 /var/www/mydomain.it/htdocs/wp-includes/class-wp-hook.php(324): RWMB_Image_Advanced_Field::print_templates()
    #2 /var/www/mydomain.it/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /var/www/mydomain.it/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /var/www/mydomain.it/htdocs/wp-includes/media-template.php(1584): do_action()
    #5 /var/www/mydomain.it/htdocs/wp-includes/class-wp-hook.php(324): wp_print_media_templates()
    #6 /var/www/mydomain.it/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #7 /var/www/mydomain.it/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /var/www/mydomain.it/htdocs/wp-admin/includes/template.php(2222): do_action()
    #9 /var/www/mydomain.it/htdocs/wp-admin/update.php(53): iframe_footer()
    #10 {main}
    thrown

    #48818
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    Do you use the single plugin Meta Box on your site? If so, you can deactivate the single plugin Meta Box and use only one plugin Meta Box AIO, to get all features of Meta Box plugins.

    #48823
    m.stefano@digitaldomain.it[email protected]
    Participant

    I use the single Meta Box plugin on my sites.
    This error is common on all sites I've updated to version 3.0.1 of Meta Box AIO.

    #48831
    PeterPeter
    Moderator

    Hello,

    Do you try to deactivate the single plugin Meta Box and recheck the issue?

    #48834
    m.stefano@digitaldomain.it[email protected]
    Participant

    Hi Peter
    I figured out what was causing the error.
    I found this script for adding an avatar to WordPress a while ago, and it's part of my default installation. Now, it seems to have become incompatible for some reason.

    /**
    * Custom Avatar
     */
    add_filter( 'get_avatar_url', 'mb_get_avatar_url', 10, 3 );
    
    function mb_get_avatar_url( $url, $id_or_email, $args ) {
        if ( is_numeric( $id_or_email ) ) {
            $user_id = $id_or_email;
        } elseif ( is_string( $id_or_email ) && ( $user = get_user_by( 'email', $id_or_email ) ) ) {
            $user_id = $user->ID;
        } elseif ( is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) ) {
            $user_id = (int) $id_or_email->user_id;
        }
    
        if ( empty( $user_id ) ) {
            return $url;
        }
    
        $custom_avatar = rwmb_meta( 'custom_avatar', [ 'object_type' => 'user' ], $user_id );
    
        if ( ! $custom_avatar ) {
            return $url;
        }
    
        $url = $custom_avatar['full_url'];
    
        return $url;
    }
    

    The script requires a custom field

    <?php // Displaying uploaded image: ?>
    <?php $image = rwmb_meta( 'custom_avatar', [ 'object_type' => 'user', 'size' => 'thumbnail' ], get_current_user_id() ); ?>
    <h3>Logo</h3>
    <img src="<?php echo $image['url']; ?>">
    
    <?php // or simpler: ?>
    <h3>Logo</h3>
    <?php rwmb_the_value( 'custom_avatar', [ 'object_type' => 'user', 'size' => 'thumbnail' ], get_current_user_id() ) ?>

    It would be helpful if we could use it again.
    But I can't fix it.

    #48840
    PeterPeter
    Moderator

    Hello,

    I test to use the custom code to set the custom avatar on my demo site with Meta Box AIO 3.0.1 and Meta Box 5.10.13 but I don't see any errors.
    Can you please try to deactivate all plugins except Meta Box plugins, switch to a WordPress theme and recheck this issue?

    #48846
    Lydia CookLydia Cook
    Participant

    I've just updated my staging site to 3.0.1 which is built using Bricks and I have the same issue. I have no custom avatar code. I only have Meta Box AIO installed.

    Error Details
    =============
    An error of type E_ERROR was caused in line 214 of the file /home/staging1/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php. Error message: Uncaught Error: Failed opening required '/home/staging1/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/templates/media.php' (include_path='.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php') in /home/staging1/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php:214
    Stack trace:
    #0 /home/staging1/wp-includes/class-wp-hook.php(324): RWMB_Media_Field::print_templates()
    #1 /home/staging1/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #2 /home/staging1/wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 /home/staging1/wp-includes/media-template.php(1584): do_action()
    #4 /home/staging1/wp-includes/class-wp-hook.php(324): wp_print_media_templates()
    #5 /home/staging1/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #6 /home/staging1/wp-includes/plugin.php(517): WP_Hook->do_action()
    #7 /home/staging1/wp-admin/includes/template.php(2222): do_action()
    #8 /home/staging1/wp-admin/update.php(53): iframe_footer()
    #9 {main}
    thrown

    #48847
    m.stefano@digitaldomain.it[email protected]
    Participant

    In another installation with a different server, without any sort of scripts, with version 3.0 this did not occur.
    At the time of the update...

    Versione di WordPress 6.8.2
    Tema attivo: Bricks Child Theme (versione 1.1)
    Plugin corrente: Meta Box AIO (versione 3.0.1)
    Versione PHP 8.3.24

    Dettagli dell'errore
    ====================
    Un errore di E_ERROR è stato causato nella linea 214 del file /var/www/vhosts/domain.it/httpdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php. Messaggio di errore: Uncaught Error: Failed opening required '/var/www/vhosts/domain.it/httpdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/templates/media.php' (include_path='.:/opt/plesk/php/8.3/share/pear') in /var/www/vhosts/domain.it/httpdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/media.php:214
    Stack trace:
    #0 /var/www/vhosts/domain.it/httpdocs/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/fields/image-advanced.php(79): RWMB_Media_Field::print_templates()
    #1 /var/www/vhosts/domain.it/httpdocs/wp-includes/class-wp-hook.php(324): RWMB_Image_Advanced_Field::print_templates()
    #2 /var/www/vhosts/domain.it/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /var/www/vhosts/domain.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /var/www/vhosts/domain.it/httpdocs/wp-includes/media-template.php(1584): do_action()
    #5 /var/www/vhosts/domain.it/httpdocs/wp-includes/class-wp-hook.php(324): wp_print_media_templates()
    #6 /var/www/vhosts/domain.it/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #7 /var/www/vhosts/domain.it/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /var/www/vhosts/domain.it/httpdocs/wp-admin/includes/template.php(2222): do_action()
    #9 /var/www/vhosts/domain.it/httpdocs/wp-admin/update.php(53): iframe_footer()
    #10 {main}
    thrown

    #48848
    PeterPeter
    Moderator

    Sorry, but is there any chance you read my reply above? Please try to deactivate all plugins except Meta Box plugins, switch to a WordPress theme (like 2025) and recheck this issue.

    Thanks.

    #48850
    m.stefano@digitaldomain.it[email protected]
    Participant

    Yes, I read the reply.
    I'm trying. My problem is replicating the error.
    From what I understand, this happens when it updates, then it stops giving you any more signals.
    If you read this thread, there's another user who reported the same problem.

    #48851
    Lydia CookLydia Cook
    Participant

    Despite the error message, the Meta Box AIO plugin got upgraded to v3.0.1 (according to the version in plugins) and I'm seeing no fatal issues with the website. I can't restore my staging site at the moment I'm afraid to upgrade Meta Box again as I'm currently testing other things.

    #48852
    Lydia CookLydia Cook
    Participant

    When I look at the error line "Failed opening required '/home/staging1/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/inc/templates/media.php'" and check my installation, there is no templates folder.

    #48853
    Lydia CookLydia Cook
    Participant

    Also I only have 206 lines in the media.php file.

    #48855
    Lydia CookLydia Cook
    Participant

    Ignore the last two posts as this is after update. Checking my live site running pre v3 the folder and lines are there.

    #48859
    PeterPeter
    Moderator

    Hello,

    Please copy your site to a staging site and share your staging site credentials (wp-admin and FTP) by submitting this contact form https://metabox.io/contact/
    I will take a look.

    Thank you.

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