Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Defaults module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2019 at 15:21 UTC
Updated:
25 Mar 2019 at 15:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
herved commentedI can confirm the issue on a fresh 8.6.9 install.
Here is a patch using
drupal_classloader_register()which works but I don't know for sure if this is the right way.Comment #3
herved commentedComment #4
quietone commentedI too am getting this error. Sorry, not able to test patch now.
Comment #5
drunken monkeyAh, damn, that makes sense … Really tricky to use the same code during installation and without having the module installed.
At least
drupal_get_path()already works there, that’s something. Otherwise, this would be even harder to fix. But as it looks, your proposed patch seems to be a very sensible solution.However, since manually registering class loading seems pretty hack-ish to me, perhaps we should go with a more minimal approach, of only loading that one class. Seems to work fine, too.
I also added test coverage for this in the attached patch – please test/review!
Comment #6
vinlaurens commentedI have tested the patch above and can confirm that the error does not occur anymore.
Steps I performed:
- Clean Drupal 8.6.10 install.
- Composer require drupal/search_api
- Enable "Database Search", "Database search defaults" and "Search API" at the same time.
- Got following error:
- Made sure "Database Search", "Database search defaults" and "Search API" are disabled.
- Applied the patch in #5 with "patch -p1 < 3033040-5--db_defaults_module_install_error.patch"
- Enabled modules "Database Search", "Database search defaults" and "Search API" are disabled.
- Error is not occurring anymore.
Comment #8
drunken monkeyAwesome, thanks a lot for testing!
Committed.
Thanks again, everyone!