Image upload options says upload error & media popup loads at the bottom

Support MB Frontend Submission Image upload options says upload error & media popup loads at the bottomResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38727
    Prabakaran ShankarPrabakaran Shankar
    Participant

    In the frontend submission, the image_advanced, Image_upload are not working. It displays - An error occurred in the upload. Please try again later.
    Also, the media pop up shows at the bottom (below footer). Append the image for visual identification.
    https://1drv.ms/u/s!AjLgaRuebK87hplKFU6kTAEet8hkbw?e=xvTBSb
    NOTE:
    Code I have used.

    
    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'      => __( 'User Profile Content', 'your-text-domain' ),
            'id'         => 'user-profile-content',
            'post_types' => ['user-profile'],
            'fields'     => [
                [
                    'name'             => __( 'Image Upload', 'your-text-domain' ),
                    'id'               => $prefix . 'image_upload_003jih2nut6t',
                    'type'             => 'image_upload',
                    'max_file_uploads' => 1,
                    'force_delete'     => true,
                    'max_status'       => false,
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    

    As per note in the MB Frontend submission
    add the below code in the child-functions.php file

    
    function mb_allow_subscriber_uploads() {
        if ( is_admin() ) {
            return;
        }
    
        // Replace 'subscriber' with the required role to update, can also be contributor.
        $subscriber = get_role( 'basic' );
        $subscriber->add_cap( 'upload_files' );
    }
    add_action( 'init', 'mb_allow_subscriber_uploads' );
    
    

    However, the image option is working. Able to upload the file, but not able to edit, change or delete the image.

    #38734
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Hello,
    In the image field option in the front-end form submission, there is an option to add an image. However, there is no option to edit or delete the uploaded image. There is a filter in the documentation to change the text of the edit and delete string.
    NOTE:
    I changed the user role to "administrator" to check the options. There is also no way for the "Administrator" to change or delete the uploaded image.

    #38738
    Long NguyenLong Nguyen
    Moderator

    Hi,

    It looks like the style files (CSS, JS) are not loading correctly so the option to delete the image uploaded is not displayed. It should display like this https://monosnap.com/file/GxKUSOoEB14t2tPDW1QfBj7Pv3T1Sk

    Please try to deactivate all plugins except Meta Box, MB extensions and switch to the standard theme of WordPress (2022) and recheck this issue.

    #38773
    Prabakaran ShankarPrabakaran Shankar
    Participant

    Thanks for pointing out the error
    Actually it is because the 'style - dashicons' are not loading and the user roles have been blocked from accessing the 'wp-admin'
    Both are blocking the process of uploading images.
    Please close this ticket.

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