Support » Fixing WordPress » 3.5 image upload error: theme issue

  • cellobrutos



    I’ve just updated my wordpress and can’t upload any images (or any other media) anymore. It seems to come from my theme, because when I change back to the default theme, it works fine again, and I also tried disabling all plugins with no success, as well as clearing cache etc.

    What do I need to do to make my theme work with 3.5? Otherwise, can I just redownload 3.4.x and safely reinstall that instead (won’t there be any DB issue)?

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • kaitouconan


    same here…

    cant upload a single image to my site here

    Christine Rondeau


    Volunteer Forum Moderator

    If you are sure that it’s a theme issue, you may want to change theme, fix your theme or contact your theme developer and let them know.

    With each WordPress release there are security updates so it’s best not to revert back to a lower version number.



    Hi Christine,

    I can’t change theme, the theme developer has no idea where this bug comes from (and actually I wouldn’t see why the theme would have anything to do with this, but apparently it does), but I do want to fix it. What can I do?



    Hey there,

    After some looking around, I found it to be a problem with wp-admin/admin-ajax.php (which does make sense), that I use in a portfolio section I added to the theme:

    function portfolio_metabox_do_ajax_update( $form_fields, $post ) {
    	<script type="text/javascript">
    	    // <![CDATA[
    		    url: "<?php echo admin_url( 'admin-ajax.php' );?>",
    		    type: "POST",
    		    data: "action=portfolio_update&id=<?php echo $post->post_parent; ?>",
    		    success: function(res) {
                            jQuery('#portfolio tbody', top.document).html(res);
    		    error: function(request, status, error) {
                            //alert("There was an error! Please try again.");
    	   // ]]>
    	return $form_fields;

    What can I do here?



    Doesn’t work for me either. I would like to go back to prior version also. Can anyone tell me how? Thanks in advance



    Same problem with my theme. Version 3.4.2 worked fine, but not with the new one.



    For one, those of you having issues would you mind providing the theme you’re using. Media was reworked in a major way for 3.5 and I imagine that if your themes bootstrapped off of old functions there could be some issues. You more than likely need to talk to the theme developer or update the theme yourself if you aren’t scared of that.

    One issue is that using this in an ajax function (mentioned by cellobrutos) could be problematic:

    <?php echo admin_url( 'admin-ajax.php' );?>

    See this post which describes this in detail:

    ajaxurl is a javascript variable that is always defined (as of a while ago) and your plugins and theme should use that instead of the admin_url (‘admin-ajax.php’); method if possible.

    good luck



    Forum Moderator

    As per the Forum Welcome, please post your own topic. Your problem – despite any similarity in symptoms – is likely to be completely different.

    Closing topic.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘3.5 image upload error: theme issue’ is closed to new replies.