fieldAPI.getName is not a function | Community
Skip to main content
abhisheks144250
Level 2
Nov 9, 2018 1:11 PM UTC
Solved

fieldAPI.getName is not a function

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.
shubhaga1
shubhaga1Accepted solution
New Participant
Nov 9, 2018 1:59 PM UTC

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

New Participant
Jul 31, 2019 6:12 PM UTC

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)

Translate
shubhaga1
New Participant
Nov 12, 2018 11:37 AM UTC

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

Translate
abhisheks144250
Level 2
Nov 12, 2018 10:10 AM UTC

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?

Translate
abhisheks144250
Level 2
Nov 12, 2018 9:49 AM UTC


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

Translate
abhisheks144250
Level 2
Nov 12, 2018 9:44 AM UTC

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

Translate
shubhaga1
shubhaga1Accepted solution
New Participant
Nov 9, 2018 1:59 PM UTC

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

                    }

              

Translate
smacdonald2008
Level 10
Nov 9, 2018 1:46 PM UTC

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?

Translate