Open finnlewis opened 8 months ago
See https://github.com/localgovdrupal/localgov_search/blob/1.x/src/Plugin/Block/SitewideSearchBlock.php#L81-L82
$index = Index::load('localgov_sitewide_search'); if (!$index->status()) {
In https://github.com/localgovdrupal/localgov_microsites_group/pull/438/ we are testing the upgrade path of localgov_microsites_group and hitting some permissions issues.
One apparent side-effect of this is that the localgov_sitewide_search index is not being loaded.
This causes an error on the if() chec above.
I think it might be good to make this a little more resiliant with
$index = Index::load('localgov_sitewide_search'); if ($index && !$index->status()) {
Or something more specific....
if ($index instanceof IndexInterface && !$index->status())
See https://github.com/localgovdrupal/localgov_search/blob/1.x/src/Plugin/Block/SitewideSearchBlock.php#L81-L82
In https://github.com/localgovdrupal/localgov_microsites_group/pull/438/ we are testing the upgrade path of localgov_microsites_group and hitting some permissions issues.
One apparent side-effect of this is that the localgov_sitewide_search index is not being loaded.
This causes an error on the if() chec above.
I think it might be good to make this a little more resiliant with
Or something more specific....