Line 4139 of post.php
in WP 6.2 branch has the error message, Content, title, and excerpt are empty.
. Reviewing the previous lines of code, it should be excluded for attachments, but there may be a callback applied to the wp_insert_post_empty_content
filter which is requiring attachments to also have content, title, and excerpt.
Use Query Monitor or search your codebase for uses of the wp_insert_post_empty_content
filter. If none are found, then you can use the second parameter of the filter to restore core functionality on the filter (untested):
add_filter( 'wp_insert_post_empty_content', static function ( $maybe_empty, $postarr ) {
$post_type = empty( $postarr['post_type'] ) ? 'post' : $postarr['post_type'];
$post_title = $postarr['post_title'];
$post_content = $postarr['post_content'];
$post_excerpt = $postarr['post_excerpt'];
return 'attachment' !== $post_type
&& ! $post_content && ! $post_title && ! $post_excerpt
&& post_type_supports( $post_type, 'editor' )
&& post_type_supports( $post_type, 'title' )
&& post_type_supports( $post_type, 'excerpt' );
}, 9999, 2 );