inpsyde / wpml2mlp

Convert posts from an existing WPML multilingual site via WXR Export/Import for MultilingualPress
https://wordpress.org/plugins/wpml-to-multilingualpress/
GNU General Public License v2.0
10 stars 6 forks source link

Argument 2 passed to DefaultImporterError::record() doesn't implement ImportElementInterface #61

Closed maartenbusstra closed 7 years ago

maartenbusstra commented 7 years ago

I'm getting the following error when importing posts:

Fatal error: Uncaught TypeError: Argument 2 passed to W2M\Log\Recorder\DefaultImporterError::record() must implement interface W2M\Import\Type\ImportElementInterface, array given, called in /Users/maartenbusstra/dev/git/em/wp-includes/class-wp-hook.php on line 298 and defined in /Users/maartenbusstra/dev/git/em/wp-content/plugins/wpml2mlp/inc/Log/Recorder/DefaultImporterError.php:41
Stack trace:
#0 /Users/maartenbusstra/dev/git/em/wp-includes/class-wp-hook.php(298): W2M\Log\Recorder\DefaultImporterError->record(Object(WP_Error), Array)
#1 /Users/maartenbusstra/dev/git/em/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#2 /Users/maartenbusstra/dev/git/em/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /Users/maartenbusstra/dev/git/em/wp-content/plugins/wpml2mlp/inc/Import/Service/Importer/WpPostImporter.php(129): do_action('w2m_import_post...', Object(WP_Error), Array)
#4 /Users/maartenbusstra/dev/git/em in /Users/maartenbusstra/dev/git/em/wp-content/plugins/wpml2mlp/inc/Log/Recorder/DefaultImporterError.php on line 41

Do you know what I can do to resolve the issue?

dnaber-de commented 7 years ago

Hi, thanks for the reporting. That's indeed a bug in the plugin. I'll try to provide a patch as soon as possible.

dnaber-de commented 7 years ago

Maarten, can you deploy the current master branch of the plugin and test it with this version? After checking out the current master, you'll have to run composer install --no-dev to build the autoloader.

maartenbusstra commented 7 years ago

Thanks for your time! I hope I can look into it today; I'll let you know.

maartenbusstra commented 7 years ago

It looks like it succeeded. Thanks a bunch!