Expand my Community achievements bar.

SOLVED

fieldAPI.getName is not a function

Avatar

Level 2

Same dialog with ACS commons works in 6.1, but when i am referring my multifield to coral/foundation in 6.4 which has "image select" and trying to save this error is coming.

1 Accepted Solution

Avatar

Correct answer by
Level 1

You need to change at validation.js, error is occuring because function is not defined

Overlay file in apps and make change /libs/cq/gui/components/authoring/dialog/richtext/clientlibs/rte/coralui3/js/validation.js

                    getName: function() {

                        return editor.getAttribute('name');

                    },

                    setName: function(value) {

                        container.querySelector("input[type='hidden'][data-cq-richtext-input='true']").name = value;

                        editor.setAttribute('name', value);

                    }

              

View solution in original post

7 Replies

Avatar

Level 10

What ACS commons project are you working with. Are you sure it's compatiable with 6.4. Can you please point to the code base you are using?

Avatar

Correct answer by
Level 1

You need to change at validation.js, error is occuring because function is not defined

Overlay file in apps and make change /libs/cq/gui/components/authoring/dialog/richtext/clientlibs/rte/coralui3/js/validation.js

                    getName: function() {

                        return editor.getAttribute('name');

                    },

                    setName: function(value) {

                        container.querySelector("input[type='hidden'][data-cq-richtext-input='true']").name = value;

                        editor.setAttribute('name', value);

                    }

              

Avatar

Level 2

Issue still persists...i dont have a RTF.
There is a Select box(Image/video)(granite/ui/components/coral/foundation/form/select).
Based on the selection,( cq/gui/components/authoring/dialog/fileupload) uploads the file.  

This whole set is inside a multifield(granite/ui/components/coral/foundation/form/multifield) . Have given composite property to multifield as true.

shubhaga1

granite/ui/components/coral/foundation/form/multifield

Avatar

Level 2

1619683_pastedImage_0.png
as soon as debugger will proceed this will give a error.

Avatar

Level 2

1 more thing is like..my multifield is now: granite/ui/components/coral/foundation/form/multifield
but my fileupload is: cq/gui/components/authoring/dialog/fileupload
can this be a issue? as 1 is coral other is not?Solution?

Avatar

Level 1

Solution was for RTE, for fileupload this is still issue and is internally being looked at.

For fileupload, granite/ui/components/coral/foundation/form/fileupload should work within the multifield however it doesnot support dragNdrop of assets

For cq/gui/components/authoring/dialog/fileupload, fieldAPI.getName is not a function"  is known

Avatar

Level 1

Hey Shubaga,

This issue might have been resolved for you now, but just for others who face this issue - There were a few known issues in 6.4.0 - 6.4.2.0 versions, which got fixed in 6.4.3.0, and adding the RTE in a multifield component is one of them.

AEM 6.4 Service Pack Release Notes​  (please see 6.4.3.0 Release notes)