Title: Unit test errors with importer
Last modified: August 20, 2016

---

# Unit test errors with importer

 *  [ggFavorit](https://wordpress.org/support/users/ggfavorit/)
 * (@ggfavorit)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/)
 * Hi.
    Sorry for my english =)
 * I use this Unit test setup.
    [http://codex.wordpress.org/Theme_Unit_Test](http://codex.wordpress.org/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)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557176)
 * Try deleting the plugin and downloading a fresh copy.
 *  [eyewinder](https://wordpress.org/support/users/eyewinder/)
 * (@eyewinder)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557389)
 * 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](https://wordpress.org/support/users/ggfavorit/)
 * (@ggfavorit)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557423)
 * 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.
 *  [eyewinder](https://wordpress.org/support/users/eyewinder/)
 * (@eyewinder)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557426)
 * 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:
    [http://wpcandy.com/made/the-sample-post-collection/](http://wpcandy.com/made/the-sample-post-collection/)
 * Good luck!
 *  [Paul](https://wordpress.org/support/users/paulcass82/)
 * (@paulcass82)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557447)
 * 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.
 *  [Sonja London](https://wordpress.org/support/users/summit/)
 * (@summit)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557448)
 * 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`
 *  [Paul](https://wordpress.org/support/users/paulcass82/)
 * (@paulcass82)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557449)
 * Yes this is exactly what I am getting too it’s so frustrating 🙁
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557450)
 * This has been covered elsewhere. There is an issue with the current theme unit
   test.
 *  [Paul](https://wordpress.org/support/users/paulcass82/)
 * (@paulcass82)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557451)
 * Any idea when it will be resolved? Or are there any links to previous working
   versions of the theme unit test? Thanks.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557452)
 * > 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.

 * 10 replies
 * 5 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/unit-test-errors-with-importer/#post-3557452)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
