During Backdrop Office Hours we were trying to run the d2b module. During the core module update, we encountered this error.
Fatal error: Uncaught Error: Undefined constant "ENTITY_PLUS_CUSTOM" in /home/bpsal/public_html/backdrop.bps-al.org/modules/search_api/search_api.module:2862 Stack trace: #0 /home/bpsal/public_html/backdrop.bps-al.org/modules/search_api/contrib/search_api_views/views/search_api_views.views.inc(255): search_api_index_load_multiple(false) #1 /home/bpsal/public_html/backdrop.bps-al.org/core/modules/views/includes/utility.inc(459): search_api_views_views_plugins() #2 /home/bpsal/public_html/backdrop.bps-al.org/core/modules/views/includes/cache.inc(147): views_discover_plugins() #3 /home/bpsal/public_html/backdrop.bps-al.org/core/modules/views/views.module(1160): _views_fetch_plugin_data(NULL, NULL, false) #4 /home/bpsal/public_html/backdrop.bps-al.org/core/modules/views/views.module(115): views_fetch_plugin_data() #5 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/theme.inc(558): views_theme(Array, 'module', 'views', 'core/modules/vi...') #6 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/theme.inc(715): _theme_process_registry(Array, 'views', 'module', 'views', 'core/modules/vi...') #7 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/theme.maintenance.inc(104): _theme_build_registry(Object(stdClass), Array, 'phptemplate') #8 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/theme.inc(304): _theme_load_offline_registry(Object(stdClass), Array, 'phptemplate', false) #9 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/theme.inc(1024): theme_get_registry(false) #10 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/errors.inc(256): theme('maintenance_pag...', Array) #11 /home/bpsal/public_html/backdrop.bps-al.org/core/includes/bootstrap.inc(2993): _backdrop_log_error(Array, true) #12 [internal function]: _backdrop_exception_handler(Object(Error)) #13 {main} thrown in /home/bpsal/public_html/backdrop.bps-al.org/modules/search_api/search_api.module on line 2862
Comments
Be sure the module Entity Plus is in your Backdrop's installation /modules folder. If it is, then try enabling the Drupal 7 Entity Plus stub module in your D7 site before you upgrade.
Thanks for looking at this. Entity Plus is in the Backdrop Modules folder. Are you saying to install the Entity Plus stub module into my existing/production Drupal 7 site? I do not have the module at this time, unless it goes by a different name in Drupal 7.
Ok, I read the wiki, now it makes sense.
Thanks Argie! We were just getting started with that migration in Office Hours, and were getting close, but ran into that error.
We will keep going on this next week. Glad to have your eyes on this!
I think this alternative works too. Instead of installing the stub modules, you may be able to just insert the relevant records in the systems table (while also ensuring entity_plus and entity_ui exist on the Backdrop install. Like this:
INSERT INTO `system` (`filename`, `name`, `type`, `owner`, `status`, `bootstrap`, `schema_version`, `weight`, `info`) VALUES
('modules/contrib/entity_plus/entity_plus.module', 'entity_plus', 'module', '', 1, 0, -1, 0, 'a:13:{s:4:\"name\";s:11:\"Entity Plus\";s:11:\"description\";s:59:\"Functions and wrappers to extend core Entity functionality.\";s:8:\"backdrop\";s:3:\"1.x\";s:4:\"type\";s:6:\"module\";s:7:\"project\";s:11:\"entity_plus\";s:7:\"version\";s:10:\"1.x-1.0.21\";s:9:\"timestamp\";s:10:\"1713389683\";s:5:\"mtime\";i:1732815877;s:12:\"dependencies\";a:0:{}s:7:\"package\";s:5:\"Other\";s:3:\"php\";s:5:\"5.6.0\";s:5:\"files\";a:0:{}s:9:\"bootstrap\";i:0;}'),
('modules/contrib/entity_ui/entity_ui.module', 'entity_ui', 'module', '', 1, 0, -1, 0, 'a:13:{s:4:\"name\";s:9:\"Entity UI\";s:11:\"description\";s:27:\"Provides a UI entity forms.\";s:7:\"package\";s:6:\"Entity\";s:8:\"backdrop\";s:3:\"1.x\";s:4:\"type\";s:6:\"module\";s:7:\"project\";s:9:\"entity_ui\";s:7:\"version\";s:9:\"1.x-1.0.2\";s:9:\"timestamp\";s:10:\"1703716068\";s:5:\"mtime\";i:1731519901;s:12:\"dependencies\";a:0:{}s:3:\"php\";s:5:\"5.6.0\";s:5:\"files\";a:0:{}s:9:\"bootstrap\";i:0;}');
I haven't tested this.