Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

error in widgets.js when trying to edit a component - AEM 6.1

Avatar

Level 5

The issue occurs when I'm adding extra drop-down in the dialog fieldset. 

/apps/MySite/components/HelloWorld/dialog.overlay.infinity.json - showing as an array instead of JSON

The problem appears because the snippet variable is not an object but an array.

This type of response is not handled by the widget.js and getting failed at below condition.

if (snippet.xtype.indexOf("dialog") != -1 || snippet.xtype.indexOf("wizard") != -1) {

dialogConfig = snippet;

            }

Could anyone share your insights on this??

1 Accepted Solution

Avatar

Correct answer by
Employee

Ref: The problem appears because the snippet variable is not an object but an array.

It seems to be a case of calling a method of some object X to object Y while they don't share the same method/properties i.e. An array object doesn't have a indexOf method 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Ref: The problem appears because the snippet variable is not an object but an array.

It seems to be a case of calling a method of some object X to object Y while they don't share the same method/properties i.e. An array object doesn't have a indexOf method