Skip to content

Commit 4bb8a16

Browse files
committed
AC-12336: WYSIWYG is empty in dynamic rows
Remove unwanted code
1 parent f70b564 commit 4bb8a16

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

app/code/Magento/Ui/Plugin/Config/Backend/ArraySerializedPlugin.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,36 @@
88
namespace Magento\Ui\Plugin\Config\Backend;
99

1010
use Magento\Config\Model\Config\Backend\Serialized\ArraySerialized;
11-
use Magento\Framework\App\Area;
1211
use Magento\Framework\App\RequestInterface;
13-
use Magento\Framework\App\State;
1412

1513
/**
1614
* Plugin for ArraySerialized backend model
1715
* Automatically converts row1/row2/row3 format to numerically indexed arrays
18-
* Only works in adminhtml area and on design config edit page
16+
* Only works on design config edit page
1917
*/
2018
class ArraySerializedPlugin
2119
{
22-
private const DESIGN_CONFIG_EDIT_PAGE = ['theme_design_config_edit', '_design_config_edit'];
20+
private const DESIGN_CONFIG_EDIT_PAGE = '_design_config_edit';
2321

2422
/**
25-
* @param State $appState
2623
* @param RequestInterface $request
2724
*/
2825
public function __construct(
29-
private readonly State $appState,
3026
private readonly RequestInterface $request
3127
) {
3228
}
3329

3430
/**
35-
* Convert string keys to numeric keys. Only applies in adminhtml area and on design config edit page
31+
* Convert string keys to numeric keys. Only applies on design config edit page
3632
*
3733
* @param ArraySerialized $subject
3834
* @param ArraySerialized $result
3935
* @return ArraySerialized
4036
*/
4137
public function afterAfterLoad(ArraySerialized $subject, ArraySerialized $result)
4238
{
43-
// Only apply the conversion in adminhtml area and on design config edit page
44-
if ($this->appState->getAreaCode() !== Area::AREA_ADMINHTML || !$this->isDesignConfigEditPage()) {
39+
// Only apply the conversion on design config edit page
40+
if (!$this->isDesignConfigEditPage()) {
4541
return $result;
4642
}
4743

@@ -70,6 +66,6 @@ public function afterAfterLoad(ArraySerialized $subject, ArraySerialized $result
7066
*/
7167
private function isDesignConfigEditPage(): bool
7268
{
73-
return in_array($this->request->getFullActionName(), self::DESIGN_CONFIG_EDIT_PAGE);
69+
return str_ends_with($this->request->getFullActionName(), self::DESIGN_CONFIG_EDIT_PAGE);
7470
}
7571
}

0 commit comments

Comments
 (0)