When the Search API Views Taxonomy module was moved into the main Search API module, a hook_requirements() check was added to notify the user of this change.
The problem is for sites upgrading, they may have multiple modules updated at the same time, some of which utterly break the site until update.php is run. Unfortunately, the search_api_views_taxonomy_requirements() function does not have any check on it to only run if the site is usable, so it actually prevents update.php from being run. This leads to a situation where your site is broken until you run update.php, but Search API prevents you from running update.php until you uninstall Search API Views Taxonomy, but you can't uninstall it because your site is broken.
To fix this, we should only run this requirements check on the status report page ($phase === 'runtime') and not during the the requirements check used on update.php or install.php.

| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2987237-4--do_not_prevent_update_hooks.patch | 1.58 KB | drunken monkey |
Comments
Comment #2
quicksketchComment #3
borisson_Comment #4
drunken monkeyFirst off, you forgot to actually add the
$phaseparameter to the function header, so this would have been an error every time the hook is called.Secondly, I think we do still want to prevent the module from being installed, so we also want to run during the
installphase, just notupdate.Otherwise a reasonable suggestion, though, thanks! I don't think I was aware that warnings prevented
update.phpfrom running – very good to know. (And quite a pain in your case, of course.)So, thanks again!
Revision attached, please test/review!
Comment #5
borisson_I haven't tested this, but it seems like a good way to resolve this issue. Getting feedback from @quicksketch would be ideal - but we can probably go ahead with this change anyway.
Comment #7
drunken monkeyI just tested, and it seems fine. Plus, I wanted to do a new release in the next few days, so it would be good to get this in.
Therefore: committed.
Thanks again, everyone!