Skip to content

fix(usps): remove duplicate <price_type> node breaking config XML merge (#40779)#40828

Open
lbajsarowicz wants to merge 1 commit into
magento:2.4-developfrom
lbajsarowicz:fix/40779-usps-duplicate-price-type
Open

fix(usps): remove duplicate <price_type> node breaking config XML merge (#40779)#40828
lbajsarowicz wants to merge 1 commit into
magento:2.4-developfrom
lbajsarowicz:fix/40779-usps-duplicate-price-type

Conversation

@lbajsarowicz
Copy link
Copy Markdown
Contributor

Description

app/code/Magento/Usps/etc/config.xml shipped two sibling <price_type> nodes
(EPS and COMMERCIAL) under <carriers><usps>. Magento's Dom config reader
rejects sibling elements with the same tag name and throws
More than one node matching the query: /config/default/carriers/usps/price_type
during any config merge (any custom module overriding a USPS carrier value
triggers it, as does bin/magento cache:clean).

EPS is not a valid price_type value — the dropdown source
(Magento\Usps\Model\Config\Source\PriceType) only exposes COMMERCIAL
and RETAIL; EPS is an account type. Kept the canonical
COMMERCIAL default.

Fixes #40779

Fixed Issues

Manual testing scenarios

  1. Create a custom module overriding <carriers><usps><price_type> in etc/config.xml.
  2. Run bin/magento cache:clean.
  3. Before this fix: main.ERROR: More than one node matching the query: /config/default/carriers/usps/price_type. After: cache clears cleanly.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (106 USPS unit tests pass)
  • Changes to the codebase comply with technical guidelines

vendor/magento/module-usps/etc/config.xml shipped two sibling
<price_type> nodes (EPS and COMMERCIAL) under <carriers><usps>.
Magento's Dom config reader rejects sibling elements with the same
tag name and throws "More than one node matching the query:
/config/default/carriers/usps/price_type" during any config merge.

EPS is not a valid price_type value (the price_type dropdown source
exposes only COMMERCIAL and RETAIL; EPS is an account_type). Keep
the canonical COMMERCIAL value as the single default.

Fixes magento#40779
@m2-assistant
Copy link
Copy Markdown

m2-assistant Bot commented May 25, 2026

Hi @lbajsarowicz. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@lbajsarowicz
Copy link
Copy Markdown
Contributor Author

@magento run all tests

@lbajsarowicz lbajsarowicz changed the title fix(usps): remove duplicate <price_type> node breaking config XML merge fix(usps): remove duplicate <price_type> node breaking config XML merge (#40779) May 25, 2026
@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 26, 2026
@github-project-automation github-project-automation Bot moved this to Pending Review in Pull Requests Dashboard May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

Duplicate <price_type> node in quality patch AC-15210 breaks config XML merge

2 participants