Problem/Motivation

After updating to beta 6 the declare strict types on the views plugins causes the site to return a 500 if Search API module is not installed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

emerham created an issue. See original summary.

maximkashuba made their first commit to this issue’s fork.

maximkashuba’s picture

Thanks for the report, @emerham! You're right that this fails on sites without
Search API, though the cause is the missing `SearchApiFilterTrait` rather than
`declare(strict_types)` itself.

I've pushed an MR that moves the Search API filter into an optional
`entityreference_filter_search_api` submodule, so the trait is only loaded when
Search API is installed. Existing Search API setups are migrated automatically
via an update hook.

Would you mind giving it a try and confirming it resolves the 500 on your site

maximkashuba’s picture

Status: Active » Needs review

  • maximkashuba committed 6e36d31a on 2.0.x
    Issue #3606353: Fix fatal error on sites without Search API by moving...
maximkashuba’s picture

Version: 2.0.0-beta6 » 2.0.x-dev
maximkashuba’s picture

Status: Needs review » Fixed

Fixed, deployed as beta7.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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