• I noticed that imports fail when a contentfield with over 10MB of data is encountered.

    You’ll get a message that the post-type is invalid.

    The 10MB limit is caused by a hardcode default setting of libxml.
    You can override this by adding the LIBXML_PARSEHUGE parameter to the loadxml method.
    It took me a while to figure this out.

    All that needs be done is change 1 line of code in “class-wxr-parser-simplexml.php’:

    Change line 23 from:

    $success = $dom->loadXML( file_get_contents( $file ) );

    to:

    $success = $dom->loadXML( file_get_contents( $file ),LIBXML_PARSEHUGE );

    • This topic was modified 3 years, 9 months ago by Arno Kools.
  • The topic ‘Add LIBXML_PARSEHUGE parameter to LoadXML for importing contentfields over 10MB’ is closed to new replies.