Whilst migrating from Drupal I received the below error:

Fatal error: Class 'EntityPlusControllerExportable' not found in /app/web/core/modules/entity/entity.module

As entity_plus was not enabled, I enabled it via the mysql cli (status=1), just to see if that helped.

Sadly though, this then resulted in the below error:

Call to undefined function entity_metadata_field_text_property_callback()

I am unsure which issue needs to be resolved sadly, but it feels like a migration bug at this point.

-----

Note, this was also posted on the issue queue. Sorry about the cross posting, but in retrospect, this seems like the better place to post it at first until we confirm there is an issue: https://github.com/backdrop-contrib/entity_plus/issues/23

Comments

The 'EntityPlusControllerExportable' isn't in the core codebase I don't believe, it is part of the entity_plus module, in file entity_plus.controller.inc (line 689).  I assumed this error occurred as I needed that module to be enabled (so enabled it by altering the database directly).

The full response for the second error looks like this:

Fatal error: Call to undefined function entity_metadata_field_text_property_callback() in /app/web/modules/contrib/entity_plus/modules/field.info.inc on line 30


Call Stack:

0.0004 253744 1. {main}() /app/web/core/update.php:0

0.4664 4861744 2. _batch_page() /app/web/core/update.php:569

0.4697 5095592 3. _batch_finished() /app/web/core/includes/batch.inc:96

0.4702 5122544 4. call_user_func:{/app/web/core/includes/batch.inc:435}() /app/web/core/includes/batch.inc:435

0.4702 5122624 5. update_finished() /app/web/core/includes/batch.inc:435

0.4702 5122752 6. backdrop_flush_all_caches() /app/web/core/includes/update.inc:610

0.4782 4327696 7. menu_rebuild() /app/web/core/includes/common.inc:8425

0.4796 4336888 8. menu_router_build() /app/web/core/includes/menu.inc:2874

0.4801 4485896 9. call_user_func:{/app/web/core/includes/menu.inc:2900}() /app/web/core/includes/menu.inc:2900

0.4801 4485968 10. facetapi_menu() /app/web/core/includes/menu.inc:2900

0.4801 4486168 11. facetapi_get_searcher_info() /app/web/modules/contrib/facetapi/facetapi.module:119

0.4802 4487600 12. module_invoke() /app/web/modules/contrib/facetapi/facetapi.module:578

0.4802 4487976 13. call_user_func_array:{/app/web/core/includes/module.inc:927}() /app/web/core/includes/module.inc:927

0.4802 4488280 14. search_api_facetapi_facetapi_searcher_info() /app/web/core/includes/module.inc:927

0.5013 4961664 15. SearchApiIndex->getEntityType() /app/web/modules/contrib/search_api/contrib/search_api_facetapi/search_api_facetapi.module:68

0.5013 4961720 16. SearchApiIndex->datasource() /app/web/modules/contrib/search_api/includes/index_entity.inc:398

0.5013 4961784 17. search_api_get_datasource_controller() /app/web/modules/contrib/search_api/includes/index_entity.inc:384

0.5013 4962288 18. search_api_get_item_type_info() /app/web/modules/contrib/search_api/search_api.module:2134

0.5016 4963760 19. search_api_search_api_item_type_info() /app/web/modules/contrib/search_api/search_api.module:2088

0.5016 4963936 20. search_api_entity_type_options_list() /app/web/modules/contrib/search_api/search_api.module:1036

0.5016 4964160 21. entity_plus_get_property_info() /app/web/modules/contrib/search_api/search_api.module:3140

0.5019 4964832 22. module_invoke_all() /app/web/modules/contrib/entity_plus/includes/entity_plus.property.inc:37

0.5020 4966632 23. call_user_func_array:{/app/web/core/includes/module.inc:960}() /app/web/core/includes/module.inc:960

0.5020 4966880 24. entity_plus_entity_property_info() /app/web/core/includes/module.inc:960

0.5026 4968848 25. entity_plus_metadata_field_entity_property_info() /app/web/modules/contrib/entity_plus/entity_plus.module:87

I imagine the issue is with the way I enabled the entity_plus module, but not sure I know of a better way during a migration.

Thanks for your time,
Dan

It looks like search_api is what is requiring entity_plus to be installed, right? I'm curious what would happen if you try the migration with search_api disabled.

The short answer is that it should be calling

entity_plus_metadata_field_text_property_callback

rather than

entity_metadata_field_text_property_callback

And I'm guessing it's something in the search_api module that needs to be adjusted -- for example, in this line it's generating that callback with information provided from search_api. If you're able to troubleshoot that and submit a PR to search_api that would be awesome, but if not I'd recommend posting an issue in that queue and linking to this thread.

Thanks, knowing what the function should be helped direct me.  We have adminer installed locally, so I searched the database, and found the issue was the cache tables.  So I truncated them before my Drupal export this time, and it appeared to resolve the issue.

Does truncating the cache tables (outside of Drupal UI) need to be a part of the migrations steps?

Either way, the fatal error is now gone, so just some notices I now need to look into.

Thanks for the help,
Dan