Problem/Motivation

  • When updating any of the SPA settings on the /admin/config/services/cloud/settings page, the user submitted settings are ignored if the Use React single page application (SPA) is checked.
  • The following code in the CloudAdminSettings::submitForm() prevents the user from updating those settings.
        if ($use_spa && !$use_spa_by_config) {
          $this->enableSpaApp(
            $form_state->getValue('cloud_spa_key_directory'),
            $form_state->getValue('cloud_spa_callback_url')
          );
        }
        elseif (!$use_spa) {
          $this->disableSpaApp();
        }
    

Issue fork cloud-3363995

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review

@yas please review this patch. This fixes the configuration form error when updating SPA values.

yas’s picture

Title: Fix error when updating SPA configuration on Cloud configuration page » Fix an error when updating SPA configuration on Cloud module admin page
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Related issues: +#3356454: Add an option to turn on/off SPA application

@baldwinlouie

Thank you for the fix. I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

  • yas committed dc4739a1 on 6.x authored by baldwinlouie
    Issue #3363995 by baldwinlouie, yas: Fix an error when updating SPA...

  • yas committed 4238c7f2 on 5.x authored by baldwinlouie
    Issue #3363995 by baldwinlouie, yas: Fix an error when updating SPA...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.