WordPress.org

Ready to get started?Download WordPress

Forums

[closed] 3.5 image upload error: theme issue (9 posts)

  1. cellobrutos
    Member
    Posted 1 year ago #

    Hi,

    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!
    Fran├žois

  2. kaitouconan
    Member
    Posted 1 year ago #

    same here...

    cant upload a single image to my site here

  3. 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.

  4. cellobrutos
    Member
    Posted 1 year ago #

    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?
    Thanks,
    F.

  5. cellobrutos
    Member
    Posted 1 year ago #

    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[
    	    jQuery.ajax({
    		    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) {
                            //console.log(arguments);
                            //alert("There was an error! Please try again.");
    		    }
    	   });
    	   // ]]>
        </script>
    	<?php
    	return $form_fields;
    }

    What can I do here?
    Thanks!

  6. JudyJudyJudy
    Member
    Posted 1 year ago #

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

  7. Polaik
    Member
    Posted 1 year ago #

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

  8. rfair404
    Member
    Posted 1 year ago #

    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: http://codex.wordpress.org/AJAX_in_Plugins

    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

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.