Skip to content

[5.x]: Payment gateways isFrontendEnabled setting in yaml file frequently changes itself, reverting to a boolean #3941

@samueldraper

Description

@samueldraper

What happened?

Description

Payment gateways setting "isFrontendEnabled" setting in the yaml file frequently reverts to a boolean "true", dropping the custom environment variable - resulting in the incorrect boolean value being applied.

Steps to reproduce

Happens seemingly randomly when yaml files have some other change applied, but not always.
Regularly happens when importing a database e.g. export production database and import for use on local development

Expected behavior

Gateway settings should retain and respect the $ENV_VAR that has been set.

Actual behavior

Payment gateways setting "isFrontendEnabled" setting in the yaml file frequently reverts to a boolean "true", dropping the custom environment variable - resulting in the incorrect boolean value being applied.

One example:

handle: invoice
isFrontendEnabled: $INVOICE_ENABLED
has been changed in yaml file to:
isFrontendEnabled: true

But in the control panel the field still shows that the environment variable is being used $INVOICE_ENABLED and that variable is set to false in the .env file.

Image

Craft CMS version

Craft Pro 5.6.1

Craft Commerce version

5.2.12.1

PHP version

8.2.27

Operating system and version

Linux 5.14.0-503.22.1.el9_5.x86_64

Database type and version

MariaDB 10.11.10

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-43)

Installed plugins and versions

Image Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions