diff --git a/src/Entity/Index.php b/src/Entity/Index.php index 9d741f1..3bdb931 100644 --- a/src/Entity/Index.php +++ b/src/Entity/Index.php @@ -1421,6 +1421,17 @@ class Index extends ConfigEntityBase implements IndexInterface { } } + $processors = $this->getOption('processors', array()); + foreach ($dependencies['module'] as $module) { + foreach ($this->getProcessors(FALSE) as $key => $processor) { + if ($processor->getPluginDefinition()['provider'] == $module) { + unset($processors[$key]); + $changed = TRUE; + } + } + } + $this->setOption('processors', $processors); + return $changed; } diff --git a/src/Tests/DependencyRemovalTest.php b/src/Tests/DependencyRemovalTest.php index 83aa2f7..7e07e68 100644 --- a/src/Tests/DependencyRemovalTest.php +++ b/src/Tests/DependencyRemovalTest.php @@ -67,7 +67,7 @@ class DependencyRemovalTest extends WebTestBase { $this->drupalPostForm(NULL, array('uninstall[search_api_test_processor]' => 1), $this->t('Uninstall')); // Make sure the index is not deleted when uninstalling the module. $this->assertNoText($this->t('The listed configuration will be deleted.')); - $this->assertNoText('WebTest Index'); + $this->assertText($this->t('The listed configuration will be updated.')); $this->drupalPostForm(NULL, array(), $this->t('Uninstall')); $this->assertText($this->t('The selected modules have been uninstalled.'));