Export config will also exported unnecessary config form fields.

Created on 8 August 2023, over 1 year ago
Updated 18 August 2023, over 1 year ago

Problem/Motivation

I have exported the configuration of the module and noticed that the default hidden values are also exported with it, Which are not required.

submit: 'Save configuration'
form_build_id: form-LKA-CzUdBzcv8fsHTmYJEshKMVX7MFkMS_EM2hBfxI4
form_token: DqbBG2Zc0XVZkMXH5Gt9cPESRPFzYQ66xLa2DvjnLr8
form_id: content_moderation_link_settings
op: 'Save configuration'

Steps to reproduce

Save the config form and export the configuration.

Proposed resolution

Skip the unnecessary form values.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India keshavv India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @keshavv
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India keshavv India

    Added patch, please review.

    • mandclu committed 579698c0 on 1.0.x
      Issue #3379956 by keshavv: Export config will also exported unnecessary...
  • Status changed to Fixed over 1 year ago
  • 🇨🇦Canada mandclu

    @keshavv thanks for identifying this, and for providing a fix. It seems like it might be easier to take more of an allowlist approach than the provided denylist. In fact, with a little refactoring it would probably be possible to make sure only the intended fields get saved, without managing multiple arrays. That said, the provided code solves the challenge, so the refactoring I have in mind can be a future improvement.

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

Production build 0.71.5 2024