Skip Navigation

[Resolved] Uncaught InvalidArgumentException: Invalid type provided

This support ticket is created 4 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2205307

Tell us what you are trying to do?
We're trying to migrate a Drupal site to WordPress with this plugin: hidden link
When it gets to "Importing node relationships..." a PHP Fatal error is logged regarding element_type.php.

2021-10-25T11:17:00.812145075Z [Mon Oct 25 11:17:00.811910 2021] [php7:error] [pid 73] [client 172.16.0.1:54921] PHP Fatal error: Uncaught InvalidArgumentException: Invalid type provided in /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/element_type.php:64\nStack trace:\n#0 /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/relationship/definition/definition.php(278): Toolset_Relationship_Element_Type->__construct(Array)\n#1 /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/relationship/definition/definition.php(233): Toolset_Relationship_Definition->read_definition_array(Array)\n#2 /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/relationship/definition/factory.php(19): Toolset_Relationship_Definition->__construct(Array)\n#3 /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/relationship/definition/translator.php(142): Toolset_Relationship_Definition_Factory->create(Array)\n#4 /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/relationship/definition/repository.php(95): Toolset_Rel in /var/www/html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/element_type.php on line 64, referer: hidden link

Is there any documentation that you are following?
Not really

Is there a similar example that we can see?

What is the link to your site?
The site is empty and will be filled with the content from the drupal site.

#2205625

Hi,

Welcome to Toolset support and I'd be happy to assist.

The "FG Drupal to WordPress" is a third-party plugin, so to get the most accurate and up-to-date information about that plugin's functionality, the plugin's official support should be consulted.
( hidden link )

From the errors message, it seems that the post types in which you're planning to import the posts and post relationships are not defined/registered on the website.

It would make sense to create/define the custom post types, taxonomies, and fields through the Toolset Types before the migration.

We also have a generic guide on the topic of migrating from Drupal to WordPress at:
https://toolset.com/documentation/programmer-reference/guide-drupal-developers-switching-wordpress/

regards,
Waqar