Thumbnail directory config mismatch

Created on 10 February 2023, almost 2 years ago
Updated 25 February 2023, over 1 year ago

Problem/Motivation

Default value of the Thumbnails directory setting is not synced with the saved config.

Steps to reproduce

Create a drupal and install the module.
Activate the module.
Go to the settings of the module and change the thumbnails directory to something else and save.
The value should be saved in the config but not shown properly it still shows the same default value.

Proposed resolution

The code below fixed the issue as far as I could tell.

Changed was $config->get('auto_redirect') to $config->get('thumbnails_directory') on the default_value.

$form['thumbnails_directory'] = [
  '#type' => 'textfield',
  '#title' => $this->t('Thumbnails directory'),
  '#default_value' => $config->get('thumbnails_directory') ?? 'public://qrcode_thumbnails',
  '#required' => TRUE,
  '#description' => $this->t('The path where to save the thumbnails to. This must be a valid path and should start with public://'),
];

Remaining tasks

Creating an MR.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇭Switzerland Royal_Foxy

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

Comments & Activities

Production build 0.71.5 2024