In ProcessorDecorator.php line 55: The system configuration variable…
- User
In ProcessorDecorator.php line 55:
The system configuration variable "moog_saleslead.show_partners_leads" is n ot defined. Please make sure that it is either added to bundle configuratio n settings or marked as "ui_only" in config.pls help find error
Assistant
The error message you're encountering:
The system configuration variable "moog_saleslead.show_partners_leads" is not defined. Please make sure that it is either added to bundle configuration settings or marked as "ui_only" in config.…means that Symfony’s configuration component (or OroConfigBundle in this case) is expecting the configuration node
moog_saleslead.show_partners_leadsto be defined in your extension’sConfigurationclass — but it's not being recognized, even though you've defined it insystem_configuration.yaml.
✅ Root Cause
Although you've defined the form field and tree structure correctly in
system_configuration.yml, the error is thrown because Oro ConfigBundle validates all config keys referenced in UI against theConfigurationclass using Symfony’s tree builder.So even though you added the field in YAML for the UI, the underlying
Configurationclass (Moog\Bundle\SalesLeadBundle\DependencyInjection\Configuration) must declare it explicitly too — which you attempted, but there's a mismatch or misconfiguration.
🛠️ Solution Steps
✅ 1. Check the
valuevsdefaultusage⚠️ In Oro's
SettingsBuilder, the correct way to define a default value is using thedefaultkey, notvalue.So this block in your
getConfigTreeBuilder()method is incorrect:self::SHOW_PARTNERS_LEADS => [ 'type' => 'boolean', 'value' => false, // ❌ "value" is not used by Oro/ConfigBundle ],✅ Replace it with:
self::SHOW_PARTNERS_LEADS => [ 'type' => 'boolean', 'default' => false, // ✅ Correct default value key ],This is critical. Oro uses Symfony's config component under the hood, and expects
defaultwhen defining schema. Usingvaluedoes nothing and causes the config key to be considered undefined.
✅ 2. Clear Cache
After making this change, clear the cache:
php bin/console cache:clearIf you're in dev mode, also warm up the cache:
php bin/console oro:platform:rebuild php bin/console cache:warmup
✅ 3. Double-check the namespace and service loading
Just to be thorough:
- Ensure your bundle is registered in
config/bundles.php. - Make sure your
DependencyInjection/Configuration.phpis being loaded by the bundle class. - Ensure your
services.yamlor XML is wiring things properly (though this usually doesn’t affect config validation unless you're doing something custom).
✅ Final Working
getConfigTreeBuilder()Examplepublic function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder(self::ROOT_NODE); $rootNode = $treeBuilder->getRootNode(); SettingsBuilder::append( $rootNode, [ self::SHOW_PARTNERS_LEADS => [ 'type' => 'boolean', 'default' => false, ], ] ); return $treeBuilder; }
✅ Summary
Issue Fix valueused instead ofdefaultUse 'default' => falseConfig key not recognized Ensure it's declared in ConfigurationclassCache still shows error Run cache:clearand Oro platform rebuildOnce you apply this fix, the error should disappear.
Let me know if you'd like help verifying the full integration or writing a unit test for the config!
- Ensure your bundle is registered in
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.