Title: Import Throws PHP Error
Last modified: June 7, 2018

---

# Import Throws PHP Error

 *  [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * (@ryanaduffy)
 * [8 years ago](https://wordpress.org/support/topic/import-throws-php-error/)
 * I exported sermons at crossroadslive.com using the Import/Export tool included
   in the plugin (WP 4.9.6, Sermon Manager 2.12.5) and attempted to import the file
   to our new site under development at dev.crossroadslive.com (WP 4.9.6, Sermon
   Manager 2.12.5) and got this error:
 * Notice: Undefined index: id in /var/www/dev.crossroadslive.com/public_html/wp-
   content/plugins/sermon-manager-for-wordpress/includes/admin/import/class-sm-import-
   sm.php on line 211
 * Notice: Undefined index: file in /var/www/dev.crossroadslive.com/public_html/
   wp-content/plugins/sermon-manager-for-wordpress/includes/admin/import/class-sm-
   import-sm.php on line 213
 * Warning: file_get_contents(): Filename cannot be empty in /var/www/dev.crossroadslive.
   com/public_html/wp-content/plugins/sermon-manager-for-wordpress/includes/admin/
   import/class-sm-import-sm.php on line 900
 * Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /
   var/www/dev.crossroadslive.com/public_html/wp-content/plugins/sermon-manager-
   for-wordpress/includes/admin/import/class-sm-import-sm.php:219 Stack trace: #
   0 /var/www/dev.crossroadslive.com/public_html/wp-content/plugins/sermon-manager-
   for-wordpress/includes/admin/import/class-sm-import-sm.php(178): SM_Import_SM-
   >handle_upload() #1 /var/www/dev.crossroadslive.com/public_html/wp-content/plugins/
   sermon-manager-for-wordpress/sermons.php(158): SM_Import_SM->import() #2 /var/
   www/dev.crossroadslive.com/public_html/wp-includes/class-wp-hook.php(286): SermonManager-
   >{closure}(”) #3 /var/www/dev.crossroadslive.com/public_html/wp-includes/class-
   wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 /var/www/dev.crossroadslive.
   com/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /var/
   www/dev.crossroadslive.com/public_html/wp-admin/admin.php(156): do_action(‘admin_init’)#
   6 /var/www/dev.crossroadslive.com/public_html/wp-admin/edit.php(1 in /var/www/
   dev.crossroadslive.com/public_html/wp-content/plugins/sermon-manager-for-wordpress/
   includes/admin/import/class-sm-import-sm.php on line 219
 * Upon returning to the Import/Export screen, things look a bit funky: [https://d.pr/free/i/dWyMLf](https://d.pr/free/i/dWyMLf)
   Reimporting the database from just before attempting import showed no change.
 * Any ideas?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimport-throws-php-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Nikola](https://wordpress.org/support/users/nikolam/)
 * (@nikolam)
 * [8 years ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10376854)
 * Hi there,
 * Seems like there was an an error in transferring the file from browser to server,
   and since you already have backup of the database – could you please try uploading
   again?
 * If the error persist, we will investigate further.
 * Thank you for the report.
 *  Thread Starter [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * (@ryanaduffy)
 * [8 years ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10377211)
 * Yeah, agreed! I did reinstall the DB and attempt the import two more times before
   I contacted you. Bugger! I did note, however, that the odd errors on the import
   page I referenced before ([https://d.pr/free/i/dWyMLf](https://d.pr/free/i/dWyMLf))
   persisted even after reimporting the DB backup.
 *  Thread Starter [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * (@ryanaduffy)
 * [8 years ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10377216)
 * One other note: I attempted the process on a local wordpress install (LAMP stack
   on macOS High Sierra) as well as the dev site (Ubuntu 14.04 server hosted at 
   DigitalOcean) with identical outcomes.
    -  This reply was modified 8 years ago by [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/).
 *  Thread Starter [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * (@ryanaduffy)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10419265)
 * Hi Nikola, any updates on this one? Still struggling with it.
 *  Thread Starter [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * (@ryanaduffy)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10419308)
 * On the main Import/Export page under the 3rd Party section I’m seeing multiple
   errors of: WordPress database error: [Table ‘crossroa_dev.wp_sb_sermons’ doesn’t
   exist]
    SELECT id FROM wp_sb_sermons LIMIT 1
 * This shows up after I attempt an import using an export file from the same plugin
   version.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Import Throws PHP Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sermon-manager-for-wordpress_688896.
   svg)
 * [Sermon Manager](https://wordpress.org/plugins/sermon-manager-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sermon-manager-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sermon-manager-for-wordpress/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)
 * [Import](https://wordpress.org/support/topic-tag/import/)

 * 5 replies
 * 2 participants
 * Last reply from: [ryanaduffy](https://wordpress.org/support/users/ryanaduffy/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/import-throws-php-error/#post-10419308)
 * Status: not resolved