I have uncovered two problems (semi-related) in Search API's update #8103.
1) If you have an index which uses the node_status processor with no additional configuration (i.e., it's an empty array), it will not be updated correctly because the update hook is checking if $processor['node_status'] is not empty, as opposed to non-null.
2) If you have a view which uses a Search API index that uses the node_status processor, entity type definition updates performed during the same update batch (even by other modules) may go kaboom. This is because Views will try to rebuild its own set of caches, and in so doing, will invoke a Search API hook. Which, in turn, will ultimately try to load all processor plugin definitions, including node_status (I'm glossing over the specifics because the call chain is very long, and I can post steps to reproduce if requested) -- which will result in a SearchApiException because update 8103 didn't bother to clear the cached processor plugin definitions.
I'll attach a patch which fixes both issues.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 2866454-10--fix_update_8103.patch | 1 KB | drunken monkey |
Comments
Comment #2
phenaproximaComment #3
phenaproximaComment #5
borisson_I guess explicitly clearing caches won't hurt. I think we can safely rtbc this.
Comment #7
phenaproximaI'm not sure what it means by "Patch Validation Error", but checking the console log, it doesn't look like anything I did wrong. I therefore assume that Drupal CI is cranky. Back to RTBC.
Comment #8
borisson_I've been seeing that error all day, I opened https://www.drupal.org/node/2866453 that seems to be the cause of the error. But it's not something we did wrong :)
Comment #9
borisson_queued for retesting, so the patch should be green after that.
Since this fixes the upgrade path, we should commit this before tagging a new version, so we don't have these problems when people upgrade to the next tag.
Comment #10
drunken monkeyThanks a lot for reporting this, and sorry again that I somehow didn't see this in time for RC. I'll create a new RC release with this right away.
Only some code style nit-picks regarding your patch, plus my own preference for
getContainer()->get().Comment #12
drunken monkeyI was pretty confident, but still good to see.
Committed.
Thanks a lot again, both of you!