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.

''

Comments

quicksketch created an issue. See original summary.

quicksketch’s picture

StatusFileSize
new1.48 KB
borisson_’s picture

Status: Needs review » Reviewed & tested by the community
drunken monkey’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new794 bytes
new1.58 KB

First off, you forgot to actually add the $phase parameter 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 install phase, just not update.

Otherwise a reasonable suggestion, though, thanks! I don't think I was aware that warnings prevented update.php from running – very good to know. (And quite a pain in your case, of course.)
So, thanks again!

Revision attached, please test/review!

borisson_’s picture

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.

drunken monkey’s picture

Status: Needs review » Fixed

I 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.