Skip to content

Commit d5e4161

Browse files
phenaproximadrunken-monkey
phenaproxima
authored andcommitted
Issue #2866454 by phenaproxima, drunken monkey: Fixed problems in update 8103.
1 parent fbbc4bd commit d5e4161

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Search API 1.x, dev (xxxx-xx-xx):
22
---------------------------------
3+
- #2866454 by phenaproxima, drunken monkey: Fixed problems in update 8103.
34
- #2844945 by drunken monkey: Fixed uncaught exception when adding too many
45
fields.
56

Diff for: search_api.install

+8-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ function search_api_update_8103() {
225225
$index = $config_factory->getEditable($index_id);
226226
$processors = $index->get('processor_settings');
227227

228-
if (!empty($processors['node_status'])) {
228+
if (isset($processors['node_status'])) {
229229
$processors['entity_status'] = $processors['node_status'];
230230
unset($processors['node_status']);
231231
$index->set('processor_settings', $processors);
@@ -235,6 +235,13 @@ function search_api_update_8103() {
235235
}
236236
}
237237

238+
// Clear the processor plugin cache so that if anything else indirectly tries
239+
// to update Search API-related configuration, the plugin helper gets the most
240+
// up-to-date plugin definitions.
241+
\Drupal::getContainer()
242+
->get('plugin.manager.search_api.processor')
243+
->clearCachedDefinitions();
244+
238245
return t('Switched from old "Node status" to new "Entity status" processor.');
239246
}
240247

0 commit comments

Comments
 (0)