I uninstall commerce_checkout, if I reinstall it I get this error :

[ERROR] Configuration objects (core.entity_view_display.commerce_product_variation.default.summary,
core.entity_view_mode.commerce_product_variation.summary, views.view.commerce_checkout_order_summary) provided
by commerce_checkout already exist in active configuration

Comments

lalop created an issue. See original summary.

mglaman’s picture

The problem is that the default config is missing "commerce_checkout" as an enforced dependency. For some reason it didn't get set.

The

dependencies:
  enforced:
    module:
      - commerce_order

needs to be

dependencies:
  enforced:
    module:
      - commerce_order
     -  commerce_checkout

in views.view.commerce_checkout_order_summary.yml

For now manually delete the view.

mglaman’s picture

Issue tags: +Novice
guptahemant’s picture

Assigned: Unassigned » guptahemant
guptahemant’s picture

Assigned: guptahemant » Unassigned
Status: Active » Needs review
StatusFileSize
new1.92 KB

Here I have created a patch following the comments of @mglaman and adding it with "do not test".Please review.

mglaman’s picture

Issue tags: +Needs manual testing

I'm a bit curious why https://github.com/drupalcommerce/commerce/blob/8.x-2.x/tests/src/Functi... didn't fail. But I'll be okay with a manual test of this.

guptahemant’s picture

I have re uploaded the patch for manual review.

guptahemant’s picture

Re uploading the patch after changing the file name

navneet0693’s picture

Status: Needs review » Needs work

@guptahemant You may need to write update hook for importing configurations, in case of the module is enabled on existing site.

cc: @mglaman

guptahemant’s picture

Assigned: Unassigned » guptahemant

hi @navneet0693 will check in update hooks to reimport the configuratons.

guptahemant’s picture

here is an updated patch where I have also added an hook_update_N() implementation to update the already added configurations,following the suggestions of @navneet0693 ,Please review.

guptahemant’s picture

Assigned: guptahemant » Unassigned
Status: Needs work » Needs review
mglaman’s picture

Priority: Critical » Major

I think we can just use the patch in #8. I don't see a need to update the existing configuration just to fix a core WTF for dependencies. This is the assumption it's not something people will often do (install then uninstall) unless in dev.

I'll ping bojanz for further insight.

  • bojanz committed 2d722b4 on 8.x-2.x authored by guptahemant
    Issue #2909704 by guptahemant: can't reinstall commerce_checkout after...
bojanz’s picture

Status: Needs review » Patch (to be ported)

Agreed with Matt, committed without the update hook.

UninstallTest is passing because it uninstalls all modules at once, but this issue is obviously triggered when uninstalling modules one by one. Improving that test is a task for another day though.

bojanz’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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