After installing and setting up commerce_purchase_order and exporting my site config, it worked fine, but the "payment_method_types" key in the commerce_payment.commerce_payment_gateway.purchase_order.yml config looked like this:

  payment_method_types:
    - purchase_order
    - purchase_order

Then, the next time I tried importing my site's config, it saw that config file as being changed. Even if I import it again, it still shows up as being modified next time. So then I re-exported my site config, and then the config file had this:

  payment_method_types:
    - purchase_order
    - purchase_order
    - purchase_order

I thought that was the end of it, but today I re-exported my configuration again and now there are 4 instances:

  payment_method_types:
    - purchase_order
    - purchase_order
    - purchase_order
    - purchase_order

Issue fork commerce-3059389

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bmcclure created an issue. See original summary.

bmcclure’s picture

Issue summary: View changes
FatherShawn’s picture

I've also seen this behavior, and it's definitely annoying. #3024359: Unable to translate Payment instructions is caused by the lack of a schema for the config. I'm wondering if this is a side effect?

bhushan.nagaonkar’s picture

I can also reproduce this issue with version 8.x-1.2

FatherShawn’s picture

Status: Active » Postponed (maintainer needs more info)

Does this behavior persist in 2.x?

scott_euser’s picture

Title: payment_method_types in purchase order config getting duplicated » payment_method_types config getting duplicated
Project: Commerce Purchase Order » Commerce Core
Version: 8.x-1.x-dev » 3.0.x-dev
Component: Code » Payment
Assigned: Unassigned » scott_euser
Status: Postponed (maintainer needs more info) » Needs work

I investigated this issue (which still occurs in Purchase Order 2x) and actually its documented in a comment in Commerce Core at https://git.drupalcode.org/project/commerce/-/blob/8.x-2.x/modules/payme... and adding an array_unique there sorts the issue. I can't see a way for Purchase Order to solve this as this happens in the PaymentGatewayBase within the Commerce Core > Payment module. I'll open a merge request there.

scott_euser’s picture

Status: Needs work » Needs review

Merge request attached; this also applies fine to commerce 2x

jsacksick made their first commit to this issue’s fork.

jsacksick’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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