Support » Plugin: WP User Frontend - Membership, Profile, Registration & Post Submission Plugin for WordPress » Conflict with theme AJAX. Can’t upload images (200 error)

  • Resolved Nate Zander

    (@mtnporcupine)


    Hello-

    I currently have wp user frontend installed and get a 200 error when trying to upload images. I have isolated the conflict to my custom theme, specifically my custom ajax scripts.

    I hook into the POSTed action variable to switch between my different AJAX functions using this standard code:

    $action = isset($_POST['action']) ? $_POST['action'] : null;

    I can delete all other code in my ajax.php file except the above line and the image upload functionality will fail.

    I also get this error in my JS console: jquery.min.js?ver=2.1.1:2 Uncaught TypeError: Cannot read property 'length' of undefined

    Note the images DO in fact get uploaded to the media library. But are not attached as the featured image.

    Any idea of what’s going on? Thank you for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tareq Hasan

    (@tareq1988)

    Ideally every plugin would use admin-ajax.php file, are you trying to change the handler file?

    I think I am getting the same 200 error in my site snapescape.com.

    Any solution for this?

    Sorry, yes I use admin-ajax.php as required by wordpress. I use the above line of code to catch the POSTed action variable to route to the proper php function.

    It looks like that line of code was unnecessary to get my other ajax to work. Plugin working fine now, thank you.

    I have the same issue. I can’t upload images (200 error).
    My admin folder (url) is renamed to hide it if that’s important.

    I also see an error saying that on line 256 in post-forms-list-table.php.

    What to change so I can upload the image?
    I want users to be able submit a portfolio item.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conflict with theme AJAX. Can’t upload images (200 error)’ is closed to new replies.