Skip to content

Commit 0f0d208

Browse files
ACP2E-391 Updated condition to check the category attribute
1 parent d8c656e commit 0f0d208

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\PageBuilder\Component\Form\Element;
99

10+
use Magento\Catalog\Setup\CategorySetup;
1011
use Magento\Framework\App\ObjectManager;
1112
use Magento\Framework\Data\FormFactory;
1213
use Magento\Framework\View\Asset\Repository;
@@ -17,7 +18,6 @@
1718
use Magento\PageBuilder\Model\Config as PageBuilderConfig;
1819
use Magento\PageBuilder\Model\State as PageBuilderState;
1920
use Magento\PageBuilder\Model\Stage\Config as Config;
20-
use Magento\Framework\View\ConfigInterface as ViewConfigInterface;
2121

2222
/**
2323
* Updates wysiwyg element with Page Builder specific config
@@ -68,11 +68,11 @@ public function __construct(
6868
$wysiwygConfigData = $config['wysiwygConfigData'] ?? [];
6969

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

75-
if ($attribute) {
75+
if ($attribute && $attribute->getEntityTypeId() === CategorySetup::CATEGORY_ENTITY_TYPE_ID) {
7676
$config['wysiwyg'] = (bool)$attribute->getIsWysiwygEnabled();
7777
}
7878
} catch (NoSuchEntityException $e) {

0 commit comments

Comments
 (0)