From 324ae21a120d01fff85bdf19468c89deead1b34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Kalij=C3=A4rvi?= Date: Fri, 19 Jan 2024 14:35:33 +0200 Subject: [PATCH] Changed the retrieval of calculator json data to use non-overridden data. --- modules/helfi_calculator/helfi_calculator.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/helfi_calculator/helfi_calculator.module b/modules/helfi_calculator/helfi_calculator.module index ee5e04bb3..5d59fa8e4 100644 --- a/modules/helfi_calculator/helfi_calculator.module +++ b/modules/helfi_calculator/helfi_calculator.module @@ -17,8 +17,9 @@ use Drupal\helfi_platform_config\DTO\ParagraphTypeCollection; * - view_mode: View mode; e.g., 'full', 'teaser'... */ function helfi_calculator_preprocess_paragraph__calculator(array &$variables) { - $config = Drupal::config('helfi_calculator.settings'); - $calculator_settings = $config->get('calculators'); + // Get calculator data without applying module overrides for the calculators. + $config = \Drupal::configFactory()->getEditable('helfi_calculator.settings'); + $calculator_settings = $config->getOriginal('calculators', FALSE); $active = []; foreach ($calculator_settings as $key => $value) { $variables['#attached']['drupalSettings'][$key] = $value['json'];