@lucienchalom LGTM I've just rerun PHPCS and it's not reporting any problems.
Thanks @andybroomfield I've tested this and it works as expected. Sorry for the slow response (I've been on holiday) but I'll get this released shortly.
Thanks @himanshu_jhaloya for this MR but D10 compatibility is already included in v 1.0.1
xaviemirmon β made their first commit to this issueβs fork.
xaviemirmon β made their first commit to this issueβs fork.
Hi @roland.molnar
I've debugged this issue to see why some instances of rows_content
were stored as objects versus an array as intended. This is caused by various unsets removing items in arrays and not resetting the index. When the menu_config
data is then passed through the json_encode() function, it's perceiving that attribute as an object.
[rows_content] => Array
(
[1] => Array
(
[0] => stdClass Object
(
[col_config] => stdClass Object
(
[hidewhencollapse] =>
[type] => we-mega-menu-col
[width] => 12
[block] =>
[class] =>
[block_title] => 1
)
[col_content] => Array
(
)
)
)
)
is being encoded as
"rows_content": {
"1": [
{
"col_config": {
"hidewhencollapse": "",
"type": "we-mega-menu-col",
"width": "12",
"block": "",
"class": "",
"block_title": "1"
},
"col_content": []
}
]
},
I've created an issue fork which fixing the problem by correctly re-indexing the array if items are removed to that the first index is 0.
xaviemirmon β made their first commit to this issueβs fork.
xaviemirmon β made their first commit to this issueβs fork.