Skip to content

Commit f7fdbc3

Browse files
committed
MC-3410: Category Tree Bug in Products Block - Cannot read property 'updateElement' of undefined
- Fixed issue with jsObjectName not being set correctly for nested condition objects
1 parent dcd2c8f commit f7fdbc3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/PageBuilder/Block/Adminhtml/Form/Element/ProductConditions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ private function getConfig(): array
6161
[
6262
'form_namespace' => $formNamespace,
6363
'prefix' => $attribute,
64+
'js_object_name' => $jsObjectName,
6465
]
6566
),
6667
'jsObjectName' => $jsObjectName,

app/code/Magento/PageBuilder/Controller/Adminhtml/Form/Element/ProductConditions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function execute()
5454
$this->rule->loadPost(['conditions' => $this->serializer->unserialize($conditionsEncoded)]);
5555
$formName = $this->getRequest()->getParam('form_namespace');
5656
// Combine class recursively sets jsFormObject so we don't need to
57-
$conditions->setJsFormObject($formName);
57+
$conditions->setJsFormObject($this->getRequest()->getParam('js_object_name'));
5858
// The Combine class doesn't need the data attribute on children but we do.
5959
$this->configureConditionsFormName($conditions, $formName);
6060
$result = $conditions->asHtmlRecursive();

0 commit comments

Comments
 (0)