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

  1. cellobrutos
    Posted 3 years ago #


    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!

  2. kaitouconan
    Posted 3 years 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
    Posted 3 years 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?

  5. cellobrutos
    Posted 3 years 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[
    		    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?

  6. JudyJudyJudy
    Posted 3 years 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
    Posted 3 years ago #

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

  8. rfair404
    Posted 3 years 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 3 years 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


No tags yet.