Skip to content

./bin/magento config:show returns "Configuration for path: '...' doesn't exist" if config value equals to 0 or empty string #23290

Closed
@OleksiiBulba

Description

@OleksiiBulba

Preconditions (*)

  1. Magento 2.4-develop
  2. Create module Vendor_Module
  3. Create etc/config.xml in created module Vendor_Module with new config path default/vendor_module/general/value with value 0 or '' (empty string)

Steps to reproduce (*)

  1. Open magento cli and run command ./bin/magento config:show vendor_module/general/value

Expected result (*)

  1. Should return 0 or '' (empty string)

Actual result (*)

  1. Command returns Configuration for path: "vendor_module/general/value" doesn't exist

I think it happens because there <magento_root>/vendor/magento/module-config/Console/Command/ConfigShowCommand.php:153 magento checks if value is empty and if it actualy is the error message is shown. But empty value does not mean that path does not exist. So we should check if path exist in different method.

Metadata

Metadata

Labels

Component: ConfigEvent: mleu2019Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions