Skip to content

Add null check for gatewayConfig#460

Open
LucaGallinari wants to merge 1 commit intoSylius:2.0from
webgriffe:2.0
Open

Add null check for gatewayConfig#460
LucaGallinari wants to merge 1 commit intoSylius:2.0from
webgriffe:2.0

Conversation

@LucaGallinari
Copy link
Copy Markdown
Contributor

@LucaGallinari LucaGallinari commented Mar 12, 2026

Q A
Branch? 2.0 (bug fixes, improvements)
Bug fix? "yes"
New feature? no
Related tickets -

This is not really a "direct" bug fix but more of a "indirect" bug fix, if we can call it like that 😅
Btw, this change is necessary when the Payment Method form of the admin is tagged as a sylius.live_component.admin instead of the default sylius.component.admin, like the Shipment Method form for example. You want to do this for example if you have a customization where you can configure some fees for each channel, and to do this you have to make it a Live component.
Sadly, out of the box, this will throw an error 'cause when the Live component re-renders it creates and empty Payment Method that has no gateway config and it pass from the PRE_SET_DATA of this extension and fails.
I know that is due to the fact that we made the payment method a live component with a customization, but it's probably something that this plugin should handle out of the box. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant