• Hi.
    Sorry for my english =)

    I use this Unit test setup.
    https://codex.www.ads-software.com/Theme_Unit_Test

    I install wp importer than import xml file. After this i have 2 problems

    1)Notice: Undefined offset: 1 in /wp-content/plugins/wordpress-importer/parsers.php on line 413
    Notice: Undefined offset: 1 in /wp-content/plugins/wordpress-importer/parsers.php on line 418
    Notice: Undefined offset: 1 in /wp-content/plugins/wordpress-importer/parsers.php on line 423

    Around 50 errors, and they are all the same
    ———————
    Than if i ignored them and completed use this xml file i have this errors
    2)Failed to import post tag
    around 50 errors

    2.1) Failed to import
    2 errors

    2.2)Failed to import Media “dsc20040724_152504_532”
    2 errors

    Thank for any help,
    Roman

Viewing 10 replies - 1 through 10 (of 10 total)
  • Try deleting the plugin and downloading a fresh copy.

    I’m also experiencing the same problem. Clean install of WordPress with no other plugins active. Also tried replacing the WordPress import plugin. No luck.

    The undefined offset errors all reference one of the following lines within the plugin parsers.php file: 413, 418, and 423.

    Opened up the file and found that the errors correspond to the following statements within the parse function (lines are commented). Don’t know enough about parsing or these specific variables to debug though…

    if ( false !== strpos( $importline, '<wp:category>' ) ) {
    	preg_match( '|<wp:category>(.*?)</wp:category>|is', $importline, $category );
    	$this->categories[] = $this->process_category( $category[1] ); // Line 413
    	continue;
    }
    if ( false !== strpos( $importline, '<wp:tag>' ) ) {
    	preg_match( '|<wp:tag>(.*?)</wp:tag>|is', $importline, $tag );
    	$this->tags[] = $this->process_tag( $tag[1] ); // Line 418
    	continue;
    }
    if ( false !== strpos( $importline, '<wp:term>' ) ) {
    	preg_match( '|<wp:term>(.*?)</wp:term>|is', $importline, $term );
    	$this->terms[] = $this->process_term( $term[1] ); // Line 423
    	continue;
    }

    Also of interest, the theme unit test file was updated on 03/06/13. However, I don’t have access to an older version for testing.

    Thread Starter ggFavorit

    (@ggfavorit)

    esmi

    Hi again. I don’t understand, nothing help me. Always this error

    This post
    Post Format Test: Gallery
    I don’t have any image here.

    I use test with Twenty Ten theme. Also have error BUT image in post i have all.

    I hope for any help.
    Thanks.

    I tried emailing automattic.com (they appear to host the unit test file), but I’m not sure whether they are responsible for revisions. No response yet.

    I may use the following WP sample content, but it isn’t nearly as comprehensive for testing:
    https://wpcandy.com/made/the-sample-post-collection/

    Good luck!

    Hi ggFavorit,

    I am having the same problem as you are experiencing. Just wondered if you had any luck as I am truly stuck.

    Thanks.

    Got multiple instances of each of the following:
    Failed to import post tag
    Failed to import
    Menu item skipped due to invalid menu slug: short
    Menu item skipped due to invalid menu slug: all-pages

    Yes this is exactly what I am getting too it’s so frustrating ??

    This has been covered elsewhere. There is an issue with the current theme unit test.

    Any idea when it will be resolved? Or are there any links to previous working versions of the theme unit test? Thanks.

    Any idea when it will be resolved?

    Not at the moment – no. Sorry.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unit test errors with importer’ is closed to new replies.