Skip to content

Commit d8c656e

Browse files
ACP2E-391 WYSIWYG editor is not showing for product attributes
1 parent c966417 commit d8c656e

File tree

1 file changed

+3
-4
lines changed
  • app/code/Magento/PageBuilder/Component/Form/Element

1 file changed

+3
-4
lines changed

app/code/Magento/PageBuilder/Component/Form/Element/Wysiwyg.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@ class Wysiwyg extends \Magento\Ui\Component\Form\Element\Wysiwyg
4545
* @param array $config
4646
* @param PageBuilderConfig|null $pageBuilderConfig
4747
* @param bool $overrideSnapshot
48-
* @param Repository $assetRepo
48+
* @param Repository|null $assetRepo
4949
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
5050
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
5151
* @SuppressWarnings(PHPMD.NPathComplexity)
52-
* @throws \Magento\Framework\Exception\NoSuchEntityException
5352
*/
5453
public function __construct(
5554
ContextInterface $context,
@@ -66,10 +65,10 @@ public function __construct(
6665
Repository $assetRepo = null
6766
) {
6867
$this->assetRepo = $assetRepo ?: ObjectManager::getInstance()->get(Repository::class);
69-
$wysiwygConfigData = isset($config['wysiwygConfigData']) ? $config['wysiwygConfigData'] : [];
68+
$wysiwygConfigData = $config['wysiwygConfigData'] ?? [];
7069

7170
// If a dataType is present we're dealing with an attribute
72-
if (isset($config['dataType'])) {
71+
if (isset($config['dataType']) && $context->getNamespace() === 'category_form') {
7372
try {
7473
$attribute = $attrRepository->get($data['name']);
7574

0 commit comments

Comments
 (0)