• When opening the “Crop image” popup from images in the Media Library (so, not from out of editing a post), the following error is being showed:

    {"status":"error","message":"wrong attachement"}

    Following the code it is from these lines:

    $src_file_url = wp_get_attachment_image_src($postId, 'full');
    if (!$src_file_url) {
    	echo json_encode (array('status' => 'error', 'message' => 'wrong attachement' ) );
    	exit;
    }

    This only happens when opening from the Media Library itself. When opening the Media Library from a “edit post” page, it just works fine.

  • The topic ‘“wrong attachement” error with opening popup from Media Library’ is closed to new replies.