Can't import config with 2.0.1

Created on 27 October 2023, about 1 year ago

Problem/Motivation

Updated from v1 to v2.0.1 today on my test box. All seemed fine, I could run db updates and config export.
When I tried to config import though I got this:

  The import failed due to the following reasons:                                                                                                          
  Configuration <em class="placeholder">commerce_exchanger.commerce_exchange_rates.ecb</em> depends on the <em class="placeholder">commerce_exchanger.lat  
  est_exchange_rates.ecb</em> configuration that will not exist after import.   

I am not sure if I should have done something or if this is an actual issue with the latest version.

Thanks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇬🇷Greece bserem

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

Comments & Activities

  • Issue created by @bserem
  • 🇭🇷Croatia valic Osijek

    The hook update should have deleted the config file for rates. we don't use it anymore.

    The proper procedure as for any Drupal module, post update is to run drush cex.
    This would update properly `commerce_exchanger.commerce_exchange_rates.ecb` to not hold reference on non-existing files anymore

  • 🇭🇷Croatia valic Osijek

    Can you tell me did you run drush cex post running drush updatedb -y?

    (or you can manually remove dependency within commerce_exchanger.commerce_exchange_rates.ecb)

  • 🇬🇷Greece bserem

    Hey Valic! I did update db first and export config right after. A new export doesn't change anything, yet the import does fail.

    Let me get back to you on Monday about this. I'll try to edit the file by hand as you suggest.
    Thanks

  • Status changed to Closed: won't fix about 1 year ago
  • 🇬🇷Greece bserem

    Manually editing the config yml file fixed things:

    diff --git a/config/sync/commerce_exchanger.commerce_exchange_rates.ecb.yml b/config/sync/commerce_exchanger.commerce_exchange_rates.ecb.yml
    index cbbac13500..a1a7d518a6 100644
    --- a/config/sync/commerce_exchanger.commerce_exchange_rates.ecb.yml
    +++ b/config/sync/commerce_exchanger.commerce_exchange_rates.ecb.yml
    @@ -1,9 +1,6 @@
     uuid:
     langcode: en
     status: true
    -dependencies:
    -  config:
    -    - commerce_exchanger.latest_exchange_rates.ecb
    

    Thanks @valic

  • 🇬🇧United Kingdom rossb89 Bristol

    Just had the same issue as above, the update hook deletes the latest exchange config but the other config file doesn't get it's dependency updated as part of config export so you need to manually edit to remove the dependencies section.

Production build 0.71.5 2024