Problem/Motivation

The Add config schema for selected chart library in the default settings issue post update function didn't properly migrate the old key library settings to the new one. It is doing $config->set('library_config', $library_config); instead of $config->set('charts_default_settings.library_config', $library_config);. It causes existing site to loose default config related to the default selected library.

Steps to reproduce

  1. Run git clone https://git.drupalcode.org/project/charts.git && cd charts to get the latest code of the chart module
  2. git checkout eec3914b to have the code previous to the introduction of the changes that is causing the issue described above
  3. Enable the chart module and one of the library
  4. Navigate to the chart default settings page and customize the default library settings and save
  5. Run git code checkout 5.0.x to return to the latest code of chart
  6. Run database update
  7. Now if you navigate back to the chart default settings page you will notice that the library settings have been overwritten

.

Proposed resolution

Update the post update hook to use the proper new key. Use charts_default_settings.library_config instead of library_config when setting up the value. We might also need to delete the `library_config` key on existing websites that have applied the post updated change.

Remaining tasks

Patch or MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork charts-3310145

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

nikathone created an issue. See original summary.

andileco made their first commit to this issue’s fork.

andileco’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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