Problem/Motivation

After you initially save all your settings on the Settings tab of the Apple News Settings section, if you attempt to re-save the form (say b/c you want to adjust the URL), the existing API Secret Key in active config is wiped out.

Steps to reproduce

  • Enable the module
  • Navigate to Configuration > Apple News > Settings tab
  • Enter all your credentials including API secret key and Save
  • Navigate to the Channels tab
  • Add Apple News Channel
  • Navigate back to the settings tab
  • Notice that the secret key is not shown in the UI (good)
  • Save the form without any changed
  • Navigate back to the Channels tab
  • Using the button drop down click Refresh next to your configure channel

Expected result

Success message: "Refreshed the channel details."

Actual result

Error message: "Error while trying to refreshed the channel details."

Proposed resolution

Only overwrite the API Secret Key if the user entered something into that field.

Remaining tasks

  • Write a test
  • Write a patch

User interface changes

API Secret Key will only be overwritten when user actively enters something into that field.

API changes

None.

Data model changes

None.

Issue fork applenews-3206853

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

m4olivei created an issue. See original summary.

m4olivei’s picture

Issue summary: View changes
m4olivei’s picture

Component: Code » User interface
m4olivei’s picture

Assigned: Unassigned » m4olivei

  • m4olivei committed 42f40c4 on 8.x-1.x
    Issue #3206853 by m4olivei: API Secret Key is wiped out when saving the...
m4olivei’s picture

Assigned: m4olivei » Unassigned
Status: Active » Fixed

Merged to 8.x-1.x,

Status: Fixed » Closed (fixed)

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