Cache flush does not take site install with existing configuration into account

Created on 24 November 2021, over 2 years ago
Updated 2 May 2023, about 1 year ago

Problem/Motivation

On site install with existing config flag, the config deleted and replaced. This occurs because during the site install a cache flush occurs, and the default config entities are created an installed. Afterwards the same config is being installed again, but with different uuid's. Resulting in a delete an replace.

Proposed resolution

Add a check in


/**
 * Implements hook_cache_flush().
 */
function prod_check_cache_flush() {
  prod_check_synchronize_prod_checks();
  prod_check_synchronize_prod_check_processors();
}

To only run it if it isnt a site install with existing config.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands jefuri

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks @jefuri!

    Is this part:

      global $install_state;
      if (isset($install_state['parameters']['existing_config'])) {
    

    best practice? Do you remember where you found that snippet? Any reference?
    Perhaps you should also add a comment for explanation?

Production build 0.69.0 2024