Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When importing the module I get 'missing schema' errors on show_disagree_button, popup_disagree_button_message, whitelisted_cookies, cookie_categories, fix_first_cookie_category, select_all_categories_by_default
Providing the missing schema entries in the patch file
Comment | File | Size | Author |
---|---|---|---|
#11 | eu_cookie_compliance-fix-config-schema-violation-3210365-11.patch | 1.14 KB | svenryen |
Comments
Comment #2
andretth CreditAttribution: andretth commentedComment #3
andretth CreditAttribution: andretth commentedComment #4
BoobaaLooks like you tried to update from eu_cookie_compliance-1.8 to 1.14, in which range a config schema change was introduced and handled by seemingly proper
hook_update_N()
s. During this process, you had the config schema validator service enabled (which is a good practice on development environments anyway) which prevented you from:So in short, the commit that introduced the schema change shouldn't have removed the old schema.
Comment #5
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedComment #6
mxr576@svenryen why this works as designed?
This class: https://github.com/drupal/core/blob/9.1.x/lib/Drupal/Core/Config/Develop...
Comment #7
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedI can reopen it, but I don't really understand what needs to be done.
All the fields he lists in the issue summary are removed from the module either because they were not needed or because their name changed. We don't have any plan of bringing them back.
If somebody can suggest what to actually do with this issue, we can look into it.
Comment #8
mxr576Well, I believe the issue that was reported is an unexpected behavior of Drupal. I wonder if Drupal core itself has a policy for changing/removing configs in a minor/patch version or only in a new major. As module maintainers, we are facing similar issues due to a lack of documentation about certain best practices, do-s, and don't-s.
Comment #9
svenryen CreditAttribution: svenryen at Ramsalt Lab commented@xr576, we made sure to provide an update hook whenever we changed names of config items, from what I understood, that's the best practice should need be.
Comment #10
mxr576I feel that this is related to this issue and why Config schema checker did not become a default enabled thing in local dev envs...
Comment #11
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedSince it can't hurt to have those keys defined and it will solve problems for people who have the config schema validator service enabled, I'm committing a slightly modified version of the patch (indicating DEPRECATED for the variables in question in case somebody inspects the file and stumble upon the unused keys).
Comment #13
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedComment #14
mxr576Thank you!
If the minimum required Drupal core version becomes >= 9.1 even https://www.drupal.org/node/3129881 can be used here.
Comment #15
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedWe can't drop Drupal 8, as we have 10000s of sites using the drupal 8 version of this module and I doubt they will all update to Drupal 9 (even though they should).
Comment #17
lesleyfernandes CreditAttribution: lesleyfernandes commentedHi @svenryen,
Just noticed a typo on your patch:
cookie_categories:
type: sting
label: 'Cookie categories (DEPRECATED)'
Comment #18
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedThanks for noticing that @lesleyfernandes.
Does it cause any issues, warnings or errors?
Comment #20
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedI fixed the misspelling. Thanks for spotting that!