Custom Fields
Re-Envisioned
Support General Fatal Error in class-mb-custom-table-loader.php on line 58

  • Creator
    Topic
  • #23125
    Resolved DANIEL FITIPALDO R.
    Participant

    Hi,
    I am in Meta Box Version 5.3.5 and Meta Box AIO 1.11.19.
    The system is frequently generating a critical error. Unfortunately, the error has occurred in different circumstances therefore it is difficult to reproduce. You can find the description in the following link:
    https://prnt.sc/vt5aru
    Thank you.
    Daniel

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #23129
    Long Nguyen
    Moderator

    Hi Daniel,

    Please share the code that created the custom fields, Blocks, and steps of actions. I will try to reproduce the issue on my end.

    I can see some actions follow the screenshot:
    - Create custom fields and save the value in the custom table.
    - Create some Blocks by MB Blocks.
    - Delete the post.

    #23391
    DANIEL FITIPALDO R.
    Participant

    Hi Long,
    It's not an easy issue to replicate because it seems that there is a timing condition involved and could be a cache problem. I will continue to investigate the issue and I'll get back to you with more information.
    You can close this ticket if you want.
    thanks!
    Daniel

    #23398
    DANIEL FITIPALDO R.
    Participant

    Hi Long,
    I could finally replicate the fatal error. I hope you can replicate it as well with the following instructions.
    1) Login as admin with twenty-twenty theme.
    2) Enable Autosave (60 sec as default)
    3) Create Post Type 'Test PT' with 'publicly_queryable' => true

    <div>
    function your_prefix_register_post_type() {
    
        $args = array (
            'label' => esc_html__( 'Tests PT', 'text-domain' ),
            'labels' => array(
                'menu_name' => esc_html__( 'Tests PT', 'text-domain' ),
                'name_admin_bar' => esc_html__( 'Test PT', 'text-domain' ),
                'add_new' => esc_html__( 'Add new', 'text-domain' ),
                'add_new_item' => esc_html__( 'Add new Test PT', 'text-domain' ),
                'new_item' => esc_html__( 'New Test PT', 'text-domain' ),
                'edit_item' => esc_html__( 'Edit Test PT', 'text-domain' ),
                'view_item' => esc_html__( 'View Test PT', 'text-domain' ),
                'update_item' => esc_html__( 'Update Test PT', 'text-domain' ),
                'all_items' => esc_html__( 'All Tests PT', 'text-domain' ),
                'search_items' => esc_html__( 'Search Tests PT', 'text-domain' ),
                'parent_item_colon' => esc_html__( 'Parent Test PT', 'text-domain' ),
                'not_found' => esc_html__( 'No Tests PT found', 'text-domain' ),
                'not_found_in_trash' => esc_html__( 'No Tests PT found in Trash', 'text-domain' ),
                'name' => esc_html__( 'Tests PT', 'text-domain' ),
                'singular_name' => esc_html__( 'Test PT', 'text-domain' ),
            ),
            'public' => true,
            'exclude_from_search' => false,
            'publicly_queryable' => true,
            'show_ui' => true,
            'show_in_nav_menus' => true,
            'show_in_admin_bar' => true,
            'show_in_rest' => true,
            'menu_icon' => 'dashicons-admin-appearance',
            'capability_type' => 'post',
            'hierarchical' => false,
            'has_archive' => true,
            'query_var' => true,
            'can_export' => true,
            'supports' => array(
                'title',
                'editor',
                'comments',
                'revisions',
            ),
            'rewrite' => array(
                'with_front' => false,
            ),
        );
    
        register_post_type( 'test-pt', $args );
    }
    add_action( 'init', 'your_prefix_register_post_type' );
    </div>

    4) Create Custom Field 'Test CF' for the post type 'test-pt'

    <div>
    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    
    function your_prefix_register_meta_boxes( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'      => esc_html__( 'Test CF', 'text-domain' ),
            'id'         => 'test-cf',
            'post_types' => ['test-pt'],
            'context'    => 'normal',
            'priority'   => 'high',
            'fields'     => [
                [
                    'id'   => $prefix . 'text_tpdykx1qs3k',
                    'type' => 'text',
                    'name' => esc_html__( 'Text Field CF', 'text-domain' ),
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    </div>

    5) Create Custom Field 'Test BLCK' with 'mode' => 'edit'

    <div>
    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
    
    function your_prefix_register_meta_boxes( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'    => esc_html__( 'Test BLCK', 'text-domain' ),
            'id'       => 'test-blck',
            'fields'   => [
                [
                    'id'   => $prefix . 'text_hdsmywqrchf',
                    'type' => 'text',
                    'name' => esc_html__( 'Text Field Test BLCK', 'text-domain' ),
                ],
            ],
            'category' => 'layout',
            'icon'     => 'admin-appearance',
            'type'     => 'block',
            'mode'     => 'edit',
        ];
    
        return $meta_boxes;
    }
    </div>

    6) Create a new Test PT post, insert Test BLCK block in the block editor content. Add some text to the title and both fields ('Test CF' and 'Test BLCK'), and save as draft. Then press Publish button, view the post in the Front End, return to the Editor screen clicking on the Editor button in the bottom part of the post.
    7) Once returned to the editor screen, update both fields but do not save!!, wait for Autosave to do that (+60 secs). Once Autosave saved, press Update, view the post in the Front End again, click the Edit button as in 6), and voila, you will get the fatal error.

    #23404
    Long Nguyen
    Moderator

    Hi,

    I've tried to follow your steps to reproduce the issue on my local site but not see any error. Screen record: https://share.getcloudapp.com/d5uP0eNy.

    Can you please update the new version of Meta Box AIO 1.12.0 then deactivate all plugins except Meta Box, Meta Box AIO and check it again?

    #23418
    DANIEL FITIPALDO R.
    Participant

    Thanks for your time trying to reproduce my issue. Still persists.
    Did you wait for a minute for the autosave?
    https://share.getcloudapp.com/Z4uqLOo1
    thks.

    #23435
    Long Nguyen
    Moderator

    Hi,

    Please share the credentials (Admin site and FTP account) via this form https://metabox.io/contact/. I will check it out.

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