From 1a6d4a6add5748437b332f91217f5d0292314759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuomas=20V=C3=A4limaa?= Date: Mon, 4 Sep 2023 15:14:32 +0300 Subject: [PATCH 1/2] ASU: Contact form bug fix --- .../asu_application/src/Form/ReservedApartmentContactForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/modules/custom/asu_application/src/Form/ReservedApartmentContactForm.php b/public/modules/custom/asu_application/src/Form/ReservedApartmentContactForm.php index 98cc29d5..11a19846 100644 --- a/public/modules/custom/asu_application/src/Form/ReservedApartmentContactForm.php +++ b/public/modules/custom/asu_application/src/Form/ReservedApartmentContactForm.php @@ -118,7 +118,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $to = $values['field_contact_person']; $langcode = 'fi'; $send = TRUE; - $subject = 'Yhteydenottopyyntö vapaaseen huoneistoon' . $values->field_apartment_information; + $subject = 'Yhteydenottopyyntö vapaaseen huoneistoon' . $values['field_apartment_information']; $params = [ 'subject' => $subject, 'message' => $body, From d3bac5776929aedd177b7c1f782a7caaa1f701ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuomas=20V=C3=A4limaa?= Date: Tue, 5 Sep 2023 10:10:24 +0300 Subject: [PATCH 2/2] ASU: remove apartment update on project update hook --- public/modules/custom/asu_content/asu_content.module | 8 -------- 1 file changed, 8 deletions(-) diff --git a/public/modules/custom/asu_content/asu_content.module b/public/modules/custom/asu_content/asu_content.module index d8b74460..2f39d9e3 100644 --- a/public/modules/custom/asu_content/asu_content.module +++ b/public/modules/custom/asu_content/asu_content.module @@ -381,14 +381,6 @@ function clearCache($project) { }; $apartments_index = array_map($apartments_index, $apartments_ids); - // Load apartment entities. - $apartments = \Drupal::entityTypeManager()->getStorage('node')->loadMultiple($apartments_ids); - - // Update apartments so data will updated to elastic search. - foreach ($apartments as $apartment) { - $apartment->save(); - } - // Trigger search api index update. foreach ($indexes as $index) { $index->trackItemsUpdated('entity:node', $apartments_index);