Conflict with theme AJAX. Can’t upload images (200 error)
-
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.
- The topic ‘Conflict with theme AJAX. Can’t upload images (200 error)’ is closed to new replies.