fieldAPI.getName is not a function | Community
Skip to main content
abhisheks144250
November 9, 2018
Solved

fieldAPI.getName is not a function

  • November 9, 2018
  • 7 replies
  • 4511 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by shubhaga1

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);

                    }

              

7 replies

smacdonald2008
November 9, 2018

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?

shubhaga1
shubhaga1Accepted solution
November 9, 2018

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);

                    }

              

abhisheks144250
November 12, 2018

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

abhisheks144250
November 12, 2018


as soon as debugger will proceed this will give a error.

abhisheks144250
November 12, 2018

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?

shubhaga1
November 12, 2018

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

July 31, 2019

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)