• Resolved arunschandran

    (@arunschandran)


    Hi,

    I’ve been using your plugin for a while without issues, but recently I’ve encountered a problem when uploading the profile image and cover image on the profile page.

    When I upload the images, I can see the preview, but upon posting, the process gets stuck and I receive the following error on admin-ajax.php:

    {"success":false,"data":"Invalid form ID"}

    Could you please help me understand why this error is occurring and how I can resolve it?

    Thank you for your support.

    Best regards,
    Arun S Chandran

Viewing 6 replies - 1 through 6 (of 6 total)
  • missveronica

    (@missveronicatv)

    @arunschandran

    If you are using the UM Extended plugin for upload of Profile/Cover photos
    it’s not supported from Account page anymore, look at the Note.

    Uploading photos from the Account page is no longer supported due to security improvements in the file/image upload system.

    https://docs.ultimatemember.com/article/1671-enable-profile-photo-uploader-in-register-and-account-forms

    Thread Starter arunschandran

    (@arunschandran)

    i am not using any extensions

    missveronica

    (@missveronicatv)

    @arunschandran

    You can try this code snippet, which lists the Ajax request and form_id post
    during an Image upload to the file .../wp-content/um_ajax_debug_form_id.log

    code snippet:

    add_action( 'wp_ajax_um_imageupload', 'um_ajax_debug_form_id', 9 );
    add_action( 'wp_ajax_um_resize_image', 'um_ajax_debug_form_id', 9 );
    function um_ajax_debug_form_id() {
        ob_start();
        print_r ( $_POST );
        $form_id = absint( $_POST['set_id'] );
        print_r ( get_post( $form_id ));
        file_put_contents( WP_CONTENT_DIR . '/um_ajax_debug_form_id.log', ob_get_clean() . chr(13), FILE_APPEND  );
    }

    You install the code snippet by adding it
    to your active theme’s functions.php file
    or use the “Code Snippets” Plugin

    https://wordpress.org/plugins/code-snippets/

    • This reply was modified 1 year, 1 month ago by missveronica.
    Thread Starter arunschandran

    (@arunschandran)

    This is the data I got in the log file

    Array
    (
    [action] => um_imageupload
    [key] => cover_photo
    [set_id] => 10237
    [set_mode] => profile
    [_wpnonce] => d47a564ca1
    [timestamp] => 1756435207
    [user_id] => 157
    )
    WP_Post Object
    (
    [ID] => 10237
    [post_author] => 1
    [post_date] => 2021-04-19 04:38:05
    [post_date_gmt] => 2021-04-19 04:38:05
    [post_content] =>
    [post_title] => Default Profile
    [post_excerpt] =>
    [post_status] => publish
    [comment_status] => closed
    [ping_status] => closed
    [post_password] =>
    [post_name] => default-profile
    [to_ping] =>
    [pinged] =>
    [post_modified] => 2021-04-19 04:38:05
    [post_modified_gmt] => 2021-04-19 04:38:05
    [post_content_filtered] =>
    [post_parent] => 0
    [guid] => ..../um_form/default-profile/
    [menu_order] => 0
    [post_type] => um_form
    [post_mime_type] =>
    [comment_count] => 0
    [filter] => raw
    )

    Array
    (
    [action] => um_resize_image
    [src] => ...../wp-content/uploads/ultimatemember/157/cover_photo_temp.jpg?1756435224901
    [coord] => 192,166,1536,569
    [user_id] => 157
    [key] => cover_photo
    [set_mode] => profile
    [nonce] => e8a0ce6780
    )
    missveronica

    (@missveronicatv)

    @arunschandran

    The final Ajax request for um_resize_image is failing without a value for set_id.

    Try to do both a Theme and a Plugin conflict test, if your Theme
    or another Plugin is causing a conflict with UM.

    https://docs.ultimatemember.com/article/96-how-to-do-a-plugin-theme-conflict-test

    Plugin Support Yurii

    (@yuriinalivaiko)

    Hi @arunschandran

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error uploading images to profile page’ is closed to new replies.