On review of the module code, I spotted that $updated_config in SavedSearchType::onDependencyRemoval() is never read, pointing to a definitive bug. (We don’t save the updated configuration for notification plugins that removed a dependency.)
Also, as we copied the code from Search API indexes, which have multiple types of plugins, we use $plugin_type in several places where it is unnecessary. (It is still necessary in the basic dependency data array, to distinguish between dependencies of plugins and dependencies of the type entity itself.)

Anyways, in addition to fixing that code, this definitely needs code coverage, too.

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Status: Active » Needs review
Issue tags: +Needs tests
FileSize
3.37 KB
drunken monkey’s picture

Status: Needs review » Needs work

NW for the tests.

drunken monkey’s picture

Issue tags: +Release blocker
drunken monkey’s picture

Turns out this wasn’t broken to begin with, it was just unnecessary to store $updated_config – updating the configuration within the plugin suffices, as that gets written to $type->notification_settings upon save anyways.

So, this just cleans up the code a bit and adds tests.

  • drunken monkey committed a25315c1 on 8.x-1.x
    Issue #3262824 by drunken monkey: Fixed handling of removed notification...
drunken monkey’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

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