Skip to content

Commit

Permalink
Issue #3420882 by aurelianzaha, mkalkbrenner: Do not reindex language…
Browse files Browse the repository at this point in the history
… config is saved, reindex if langauge cnfig is deleted
  • Loading branch information
mkalkbrenner committed Apr 10, 2024
1 parent 4ae9e7e commit 080e896
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/EventSubscriber/ConfigSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ public function onConfigSave(ConfigCrudEvent $event) {

$saved_config = $event->getConfig();

// Unfortunately, we can't check for $saved_config->isNew() here anymore as
// it always returns false.
// @todo find a way to limit the the condition to new language configs.
if (preg_match('@^language\.entity\.(.+)@', $saved_config->getName(), $matches) &&
$matches[1] != LanguageInterface::LANGCODE_NOT_SPECIFIED && $matches[1] != LanguageInterface::LANGCODE_NOT_APPLICABLE &&
$saved_config->isNew())
$matches[1] != LanguageInterface::LANGCODE_NOT_SPECIFIED && $matches[1] != LanguageInterface::LANGCODE_NOT_APPLICABLE)
{
$restrict_by_dependency = [
'module' => 'search_api_solr',
Expand Down

0 comments on commit 080e896

Please sign in to comment.