Fix shortcut_install() and shortcut_themes_installed(): Only update config when syncing flag is FALSE

Created on 12 August 2015, over 9 years ago
Updated 16 July 2024, 4 months ago

Problem/Motivation

shortcut_install() doesn't check config installer syncing flag while editing the seven theme settings.

Proposed resolution

Update the shortcut_install() so that it only edits config when config installer syncing flag is FALSE.

Remaining tasks

Review.
Commit.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Shortcut 

Last updated about 2 months ago

Created by

🇵🇰Pakistan jibran Sydney, Australia

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇬🇧United Kingdom alexpott 🇪🇺🌍
  • Status changed to Needs review almost 2 years ago
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    @jibran - system is a special case. It's always installed and the site UUID is even more special with respect to configuration imports.

  • Status changed to Needs work almost 2 years ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇦🇺Australia acbramley

    Looks like this is still valid (install hook in shortcut on 11.x still looks roughly the same), needs a reroll into an MR.

  • First commit to issue fork.
  • Merge request !8765MR #24 → (Open) created by chaitanyadessai
  • Status changed to Needs review 4 months ago
  • 🇮🇳India chaitanyadessai Goa

    Please review MR from #24.

  • Status changed to Needs work 4 months ago
  • The Needs Review Queue Bot tested this issue.

    While you are making the above changes, we recommend that you convert this patch to a merge request . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

  • Pipeline finished with Failed
    4 months ago
    Total: 578s
    #224337
  • 🇮🇳India Akhil Babu Chengannur

    Tried to reproduce this issue, but couldn't. These are the things that I've tried so far in fresh Drupal 10.3 instance (standard profile)

    • Set third_party_settings.shortcut.module_link value in claro.settings to FALSE
    • Exported the configuration
    • Uninstalled the shortcut module
    • Imported the configuration
    • The value of third_party_settings.shortcut.module_link should have changed to TRUE as per the hook_install code in the module. But the value after config sync was still FALSE
    • Set third_party_settings.shortcut.module_link value in claro.settings to FALSE
    • Exported configuraion
    • Changed the default admin theme to stark
    • Imported the configuration
    • The value of third_party_settings.shortcut.module_link should have changed to TRUE as per the hook_install code in the module. But the value after config sync was still FALSE

    So adding 'Needs steps to reproduce' tag.

  • 🇮🇳India Akhil Babu Chengannur

    Also, adding !\Drupal::isConfigSyncing() condition in shortcut_themes_installed breaks the standard profile recipe test. \Drupal::isConfigSyncing() is true while applying the standard profile recipe. Sothird_party_settings.shortcut.module_link value in claro.settings is never set to true.

Production build 0.71.5 2024