Description
This issue is automatically created based on existing pull request: #27940: Avoid exception when config.xml nodes exist for not-installed payment methods
Preconditions (*)
Magento 2.4-develop
When a payment configuration node exists in XML but there is no <model>
defined, getList()
will throw an UnexpectedValueException
. One use case for creating such a set-up is a module that provides default configuration overrides for payment methods which are not installed on the current website. For example:
<config>
<default>
<payment>
<checkmo>
<active>0</active>
</checkmo>
<not_installed_here>
<debug>0</debug>
<environment>production</environment>
</not_installed_here>
</payment>
</default>
</config>
In this case, the payment method not_installed_here
does not have a <model>
node defined, as the payment method module is not installed on the website.
Steps to reproduce (*)
- Add supplied XML or similar to a local module's
config.xml
- Browse to checkout with an item in basket
- Observe (lack of) exception thrown during checkout page load
Expected result (*)
Actual result (*)
Additional information
I have not yet written/changed any unit/functional tests for this change. I suspect some existing tests may fail which I will review at a later date.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status