main.CRITICAL: Notice: Undefined index: default in CompositeConfigProvider.php on line 160
-
08-03-2021 - |
Question
I have currently a problem with my Magento 2 (2.3.2)
I'm using the Webkul multi vendor module and when I open a seller profile, the profile view is empty.
I've checked the system.log
and got this:
[2019-07-31 08:28:54] main.CRITICAL: Notice: Undefined index: default in /opt/bitnami/apps/magento/htdocs/vendor/magento/module-cms/Model/Wysiwyg/CompositeConfigProvider.php on line 160 [] []
/**
* Update config using config provider by active editor path
*
* @param \Magento\Framework\DataObject $config
* @param array $configProviders
* @return \Magento\Framework\DataObject
*/
private function updateConfig($config, array $configProviders)
{
$adapterType = $this->getActiveEditorPath($config);
//Extension point to update plugin settings by adapter type
$providerClass = isset($configProviders[$adapterType])
? $configProviders[$adapterType]
: $configProviders['default']; <--### Here is the Error position ###
/** @var \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface $provider */
$provider = $this->configProviderFactory->create($providerClass);
return $provider->getConfig($config);
}
Somehow the $configProvider
is empty, but I don't know why it is empty.
Did someone had the same error?
Greetings
Solution
Add the following code in the app/etc/di.xml file
<type name="Magento\Cms\Model\Wysiwyg\CompositeConfigProvider">
<arguments>
<argument name="variablePluginConfigProvider" xsi:type="array">
<item name="default" xsi:type="string">Magento\Variable\Model\Variable\ConfigProvider</item>
</argument>
<argument name="widgetPluginConfigProvider" xsi:type="array">
<item name="default" xsi:type="string">Magento\Widget\Model\Widget\Config</item>
</argument>
<argument name="wysiwygConfigPostProcessor" xsi:type="array">
<item name="default" xsi:type="string">Magento\Cms\Model\Wysiwyg\DefaultConfigProvider</item>
</argument>
<argument name="galleryConfigProvider" xsi:type="array">
<item name="default" xsi:type="string">Magento\Cms\Model\Wysiwyg\Gallery\DefaultConfigProvider</item>
</argument>
</arguments>
</type>
Flush the cache and check whether this solution works for you.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange