diff --git a/src/KeyEntityFormEnhancer.php b/src/KeyEntityFormEnhancer.php index 7d635cb6..c40c4de6 100644 --- a/src/KeyEntityFormEnhancer.php +++ b/src/KeyEntityFormEnhancer.php @@ -344,6 +344,9 @@ public function validateForm(array &$form, FormStateInterface $form_state): void // Test the connection. $this->connector->testConnection($test_key); $this->messenger()->addStatus($this->t('Connection successful.')); + + // Based on type of organization, cache needs to clear. + drupal_flush_all_caches(); } catch (\Exception $exception) { watchdog_exception('apigee_edge', $exception); diff --git a/src/Plugin/KeyInput/ApigeeAuthKeyInput.php b/src/Plugin/KeyInput/ApigeeAuthKeyInput.php index d016cc0a..dc1a09fd 100644 --- a/src/Plugin/KeyInput/ApigeeAuthKeyInput.php +++ b/src/Plugin/KeyInput/ApigeeAuthKeyInput.php @@ -317,6 +317,7 @@ public function processSubmittedKeyValue(FormStateInterface $form_state) { // Reset values to just `key_value`. $form_state->setValues(['key_value' => Json::encode(array_filter($input_values))]); + return parent::processSubmittedKeyValue($form_state); }