Currently having the following issue with ACF when trying to create a new field group. The following error generate when you click add field with the field not being generated.
acf-input.min.js?ver=5.6.1:1 Uncaught TypeError: Cannot read property ‘outerHTML’ of undefined
at a.fn.init.$.fn.outerHTML (acf-input.min.js?ver=5.6.1:1)
at Object.update_field_meta (acf-field-group.min.js?ver=5.6.1:1)
at Object.wipe_field (acf-field-group.min.js?ver=5.6.1:1)
at Object.add_field (acf-field-group.min.js?ver=5.6.1:1)
at Object.add (acf-field-group.min.js?ver=5.6.1:1)
at HTMLAnchorElement.<anonymous> (acf-input.min.js?ver=5.6.1:1)
at HTMLDocument.dispatch (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:3)
at HTMLDocument.r.handle (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery…:3)
I do not see this error on my test site. More than likely you have a conflict with something else like a plugin or something in your theme. You’ll need to deactivate other plugins and maybe switch themes to see if you can figure out what is causing the conflict. Once we know what’s causing the issue then we might be able to figure out why.
Any update? It was actually working just fine with the current plugins we have, and literally nothing in our plugins or scripts has changed recently.
I am getting the same error even after updating plugin to latest version. The error occurs when I am using a WYSIWYG editor in a repeater field and try to show all buttons.
The add media and add form button work, but the entire wysiwyg editor does not show and looks broken on the page.
The code error is here:
!function($) {
$.fn.exists = function() {
return $(this).length > 0
}
,
$.fn.outerHTML = function() {
return $(this).get(0).outerHTML
}
line 105ish acf-input.min.js..
Seems like $(this).get(0) is undefined. Not sure how that would be a conflict from another plugin.
SOLVED!
Hope this helps. The culprit is having any html tags in the field instructions. Might have value to sanitize any field instructions so if helper html/code is added it doesn’t break the actual page and prints as text.
Can you give me an example of the html tags in instructions that caused this?
The topic ‘Uncaught TypeError: Cannot read property 'outerHTML' of undefined’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.