Support » Plugin: Ultimate Member - User Profile & Membership Plugin » Image upload error after latest malware update

  • After updating to latest version (which fixed this from our site: https://wordpress.org/support/topic/malicious-files-in-ultimate-members-plugin/) we can’t upload images to UM profiles. Upload gets stuck in image upload window, javascript error:

    SyntaxError: Unexpected token < in JSON at position 0
        at JSON.parse (<anonymous>)
        at Function.n.parseJSON (jquery.js?ver=1.12.4:4)
        at Function.a.parseJSON (jquery-migrate.min.js?ver=1.4.1:2)
        at Object.onSuccess (um-functions.min.js?ver=4.9.8:1)
        at Object.success (um-fileupload.min.js?ver=4.9.8:1)
        at Object.t.success (um-jquery-form.min.js?ver=4.9.8:1)
        at i (jquery.js?ver=1.12.4:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
        at y (jquery.js?ver=1.12.4:4)
        at XMLHttpRequest.c (jquery.js?ver=1.12.4:4) "<!DOCTYPE html>
    <html lang="fi" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" prefix="og: http://ogp.me/ns#">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    .... page source code continues

    This error comes right after image is uploaded.

    I also confirmed the same issue on our dev server, updated only “UM” to the newest version (Version 2.0.24) and tested image uploading before and after update. Upload worked before plugin update.

    Web server uploads directory and ultimate member directory has permissions “755”:
    Image

Viewing 13 replies - 1 through 13 (of 13 total)
  • Also tested version 2.0.21, which works normally. Malware is not fixed in that version, so can’t use that in production…

    I also updated the database to the newest version (as the 2.0.24 version says)

    • This reply was modified 1 year, 3 months ago by audpxi.

    YES, i m facing this problem too.
    Now my website is having lot of request and cant load 🙁

    I have the same problem,any solution?

    I’m having the same issue as well. Upgraded to version 2.0.24 and am now receiving the error message: SyntaxError: Unexpected token < in JSON at position 0

    *Added: I’ve also made sure to update the database settings as well.

    • This reply was modified 1 year, 3 months ago by fifthstory.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @fifthstory,

    Did you try clearing/purging site cache or updating CDNs after the UM updates? If you have JS/CSS Minification plugin, please try purging or merging the files again as we have some changes in the assets.

    Regards,

    Yes @fifthstory, I have cleared cache and it’s not fixing the issue. I also tested and confirmed this issue to happen even when I’m not using any cache plugin

    I did clear my Hummingbird caching and am now receiving a new error… “ERROR: SyntaxError: JSON Parse error: Unexpected identifier “organization””

    I also tried doing the upload from the user’s profile page (instead of registration) and received the SyntaxError: Unexpected token < in JSON at position 0 error

    • This reply was modified 1 year, 3 months ago by fifthstory.

    Update… It appears that the issue is in completing the upload. On the profile pages (not the registration page), after I get the error message and hit cancel, I can refresh the page and the image is there.

    Anyone figure out a solution to this issue? Suddenly we are experiencing the same problem when trying to upload profile images.

    I still haven’t figured out an answer to the main SyntaxError problem.

    I would like an answer as well, profile picture upload stopped working after the update. Just a green bar, but no upload.

    I also tried everything in this thread: https://docs.ultimatemember.com/article/96-how-to-do-a-plugin-theme-conflict-test

    • This reply was modified 1 year, 2 months ago by squinx.

    Update on my issue…

    So, it turns out that there is an error with a custom function that I was using in my child theme…

    add_action(‘um_before_upload_db_meta’, ‘my_before_upload_db_meta’, 10, 2);

    function my_before_upload_db_meta($user_id, $key) {
    print_r($key);
    }

    Once I commented out the print_r($key); the uploads began to work. The only problem is that this disabled the ability to upload images at the time of registration.

    I found a solution to the problem. Watch carefully. You have a missing file. um-image-upload.php

    Download the plugin and upload the file /wp-content/plugins/ultimate-member/core/lib/upload/um-image-upload.php

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Image upload error after latest malware update’ is closed to new replies.