Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Capuderg,

    here is the link to the XML file.( XML Import )

    Smaller images are about 1Kb or smaller.

    Cheers,
    Milos

    P.S.
    I posted a comment on GH PR so you can download a file from there as well.

    Hi,

    I have the same issue “Failed to import (Media)”.

    The strange thing is that some images are imported and “smaller image” failed to import.

    I’m php developer so I didn’t hasitate and I dived into the code. I noticed this several lines that prevents smaller images to be imported.

    file: vendor/proteusthemes/wp-content-importer-v2/src/WXRImporter.php

    
    if ( isset( $headers['content-length'] ) && $filesize !== (int) $headers['content-length'] ) {
    			unlink( $upload['file'] );
    			return new \WP_Error( 'import_file_error', __( 'Remote file is incorrect size', 'wordpress-importer' ) );
    		}
    

    If I remove this check all images are imported. Also I found following article about this issue. (https://www.playnicetogether.com/2015/11/07/wordpress-importer-plugin-content-length-problem-solved/)

    Proposed solution does not work with the latest version of WP.

    Do you have any suggestion how to fix this without touching plugin’s code?

    Thanks in advance.

    Cheers,
    Milos

    • This reply was modified 7 years, 8 months ago by docodes.
Viewing 2 replies - 1 through 2 (of 2 total)