Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Multi-filed is not working after upgrade to AEM 6.4

Avatar

Avatar
Validate 10
Level 2
sunitac70336244
Level 2

Likes

7 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
sunitac70336244
Level 2

Likes

7 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
sunitac70336244
Level 2

12-11-2018

Dear All,

Dear All,

We have developed the multi field in CQ 5.6 and it is working fine in 5.6 . After migration to 6.4 it is not working.

Also ion developer tools I am getting the below error when I am clicking in Add Item sign.

widgets.js:112872 Uncaught TypeError: Cannot read property 'toString' of undefined

    at constructor.setOptions (widgets.js:112872)

    at new constructor (widgets.js:113410)

    at Object.create (widgets.js:25846)

    at sb.createComponent (widgets.js:30472)

    at sb.lookupComponent (widgets.js:30460)

    at sb.add (widgets.js:30266)

    at sb.<anonymous> (widgets.js:30262)

    at Object.each (widgets.js:1824)

    at sb.add (widgets.js:30261)

    at sb.initComponent (widgets.js:30152)

1) In 5.6 When we click on Add Item , it is coming fine , as shown below.

1619918_pastedImage_1.png

1619919_pastedImage_0.png

Below is the dialog and the multi field value is created by using JavaScript , as shown below.

1619920_pastedImage_3.png

var sunitaSiteClientLib = sunitaSiteClientLib || {};

if(typeof CQ !== 'undefined')

{

sunitaSiteClientLib.MultiFieldPanel = CQ.Ext.extend(CQ.Ext.Panel, {

panelValue: '',

    onstructor: function(config){

        config = config || {};

        sunitaSiteClientLib.MultiFieldPanel.superclass.constructor.call(this, config);

    },

    initComponent: function () {

        sunitaSiteClientLib.MultiFieldPanel.superclass.initComponent.call(this);

        this.panelValue = new CQ.Ext.form.Hidden({

            name: this.name

        });

        this.add(this.panelValue);

        var dialog = this.findParentByType('dialog');

        dialog.on('beforesubmit', function(){

            var value = this.getValue();

            if(value){

                this.panelValue.setValue(value);

            }

        },this);

    },

    getValue: function () {

        var pData = {};

        this.items.each(function(i){

            if(i.xtype === "label" || i.xtype === "hidden" || !i.hasOwnProperty("dName")){

                return;

            }

            pData[i.dName] = i.getValue();

        });

        return $.isEmptyObject(pData) ? "" : JSON.stringify(pData);

    },

    setValue: function (value) {

        this.panelValue.setValue(value);

        var pData = JSON.parse(value);

        this.items.each(function(i){

            if(i.xtype === "label" || i.xtype === "hidden" || !i.hasOwnProperty("dName")){

                return;

            }

            if(!pData[i.dName]){

                return;

            }

            i.setValue(pData[i.dName]);

        });

    },

    validate: function(){

        return true;

    },

    getName: function(){

        return this.name;

    }

});

CQ.Ext.reg("sunitamultifieldpanel", sunitaSiteClientLib.MultiFieldPanel);

}

2) In 6.4 , When we click on Add Item , it is not coming anything.

1619948_pastedImage_1.png

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

12-11-2018

In AEM 6.4 - most community members are working in Touch UI and not in Classic UI. Lets see if ppl answer this, but you should look at using AEM 6.4 features and move past Classic UI. I recommend that you move to granite/coral resource types -- Building Experience Manager Components using Granite/Coral Resource Types

Avatar

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Validate 25
MVP
Ratna_Kumar
MVP

Likes

158 likes

Total Posts

755 posts

Correct Reply

134 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ratna_Kumar
MVP

12-11-2018

Hi,

As AEM 6.4 is very advanced version and its built on granite framework, AEM 5.6 classic UI components may not work pm 6.4.

Some components needs to be updated to Touch UI and multifield  is very main component. Its recommended that you use granite as Scott suggests.

Thanks,

Ratna Kumar.