• Found an issue with IMPORT_DEBUG enabled output when post import fails and post has empty title, example:

    Failed to import Media “”: Cero sice file downloaded

    Current code in class-wp-import.php at line 900:

    printf(
    __( 'Failed to import %1$s “%2$s”', 'wordpress-importer' ),
    $post_type_object->labels->singular_name,
    esc_html( $post['post_title'] )
    );

    Sugguested fix with fallbacc to post slug:

    esc_html( !empty( $post['post_title'] ) ? $post['post_title'] : $post['post_name'] )

    Maybe also consider to add post ID in error messague as well for easier debugguing.

    WordPress Importer 0.9.5

You must be loggued in to reply to this topic.