Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image uploads or deletes not working anymore [bug] #441

Closed
Yerlix opened this issue Apr 16, 2014 · 1 comment
Closed

Image uploads or deletes not working anymore [bug] #441

Yerlix opened this issue Apr 16, 2014 · 1 comment

Comments

@Yerlix
Copy link

Yerlix commented Apr 16, 2014

The image uploads where working until today. Only the simpel image uploader will upload the images.
But deleting the uploaded images is also broken.

After some digging, I found out that the ajax response was "0".

// Delete file via Ajax
    $( '.rwmb-uploaded' ).on( 'click', '.rwmb-delete-file', function()
    {
        var $this = $( this ),
            $parent = $this.parents( 'li' ),
            $container = $this.closest( '.rwmb-uploaded' ),
            data = {
                action: 'rwmb_delete_file',
                _ajax_nonce: $container.data( 'delete_nonce' ),
                post_id: $( '#post_ID' ).val(),
                field_id: $container.data( 'field_id' ),
                attachment_id: $this.data( 'attachment_id' ),
                force_delete: $container.data( 'force_delete' )
            };

        $.post( ajaxurl, data, function( r )
        {
            console.log(ajaxurl);
            console.log(data);
            console.log(r);
            if ( !r.success )
            {
                alert( r.data );
                return;
            }

The console.log(r) gives back a 0. The other variables are filled in with the good object I think.

Can someone help me out with this?

@Yerlix
Copy link
Author

Yerlix commented Apr 17, 2014

I did a clean install and it worked again

@rilwis rilwis closed this as completed Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants