Home › Forums › Backend Issues (wp-admin) › Uncaught TypeError in Admin Backend › Reply To: Uncaught TypeError in Admin Backend
Not real sure what the cause/conflict is, but certainly didn’t have multiple days to spend trying to figure out the cause on a production environment.
This was the workaround implemented. Seems to be working fine now in the backend as far as I can tell, and at least not breaking half the javascript functionality on the page when it threw the null error.
Starting at line 987 of the non-minified version of input.js, added a simple null catch and exit.
$(document).ready(function(){
/* added this condition, since acf.o was null at certain points for some reason when in the admin backend */
if (acf.o == null) {
return;
}
// update post_id
acf.screen.post_id = acf.o.post_id;
acf.screen.nonce = acf.o.nonce;
Hope this at least helps someone else in a similar situation.
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.