In ProcessorDecorator.php line 55: The system configuration variable…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
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
Looking at your error message and the configuration files, the issue is that the system configuration variable moog_saleslead.show_partners_leads is not being properly registered with the Oro Platform's configuration system.
Here are the steps to fix this issue:
MoogSalesLeadExtension.php):<?php
namespace Moog\Bundle\SalesLeadBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
class MoogSalesLeadExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
// This is crucial - it registers the configuration with the container
$container->prependExtensionConfig($this->getAlias(), $config);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
/**
* {@inheritdoc}
*/
public function getAlias()
{
return Configuration::ROOT_NODE;
}
}
Ensure your system configuration YAML file is in the correct location:
Resources/config/oro/system_configuration.ymlsystem_configuration.yml (not system_configuration.yaml)Clear the cache:
php bin/console cache:clear --env=prod
php bin/console cache:clear --env=dev
If the issue persists, check these additional points:
a. Make sure your bundle is properly registered in bundles.yml or your kernel:
# config/bundles.yml
Moog\Bundle\SalesLeadBundle\MoogSalesLeadBundle: ['all' => true]
b. Verify that your bundle class exists:
<?php
namespace Moog\Bundle\SalesLeadBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class MoogSalesLeadBundle extends Bundle
{
}
c. You might need to add the configuration to the container in your extension's prepend method:
public function prepend(ContainerBuilder $container)
{
$container->prependExtensionConfig(
'oro_config',
[
'settings' => [
Configuration::ROOT_NODE => [
'resolved' => true,
Configuration::SHOW_PARTNERS_LEADS => [
'value' => false,
'scope' => 'app'
]
]
]
]
);
}
Alternative approach - If you're still having issues, you can mark it as ui_only:
# In system_configuration.yml
fields:
moog_saleslead.show_partners_leads:
data_type: boolean
type: Oro\Bundle\ConfigBundle\Form\Type\ConfigCheckbox
ui_only: true # Add this line
options:
label: moog.saleslead.system_configuration.fields.show_partners_leads.label
tooltip: moog.saleslead.system_configuration.fields.show_partners_leads.tooltip
The most common cause of this error is that the configuration is not being properly loaded by the dependency injection extension. Make sure the MoogSalesLeadExtension class exists and is processing the configuration correctly.