Home › Forums › Backend Issues (wp-admin) › Uncaught TypeError: Cannot read property 'post_id' and 'image'
When setting up a custom field for adding an image, in the backend, I’m getting the following error when I click “add image”.
The post_id happens first when I load the page, the image error happens after I try to add an image:
JQMIGRATE: Migrate is installed, version 1.4.1
post.php?post=4&action=edit:493 Uncaught ReferenceError: acf is not defined
at post.php?post=4&action=edit:493
at post.php?post=4&action=edit:505
(anonymous) @ post.php?post=4&action=edit:493
(anonymous) @ post.php?post=4&action=edit:505
post.php?post=4&action=edit:4035 Uncaught ReferenceError: acf is not defined
at post.php?post=4&action=edit:4035
(anonymous) @ post.php?post=4&action=edit:4035
input.min.js?ver=4.4.11:1 Uncaught TypeError: Cannot read property 'post_id' of null
at HTMLDocument.<anonymous> (input.min.js?ver=4.4.11:1)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2)
(anonymous) @ input.min.js?ver=4.4.11:1
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
ready @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
K @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:9 JQMIGRATE: Migrate is installed, version 1.4.1
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3 The specified value "!" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
ja @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3
n.parseHTML @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:4
a.fn.init @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:9
n @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
t.fn.n2spectrum.processNativeColorInputs @ nextend-backend.min.js?1490150156:2
(anonymous) @ nextend-backend.min.js?1490150156:2
i @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
ready @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
K @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:2
input.min.js?ver=4.4.11:1 Uncaught TypeError: Cannot read property 'image' of null
at Object.popup (input.min.js?ver=4.4.11:1)
at HTMLInputElement.<anonymous> (input.min.js?ver=4.4.11:1)
at HTMLDocument.dispatch (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3)
at HTMLDocument.r.handle (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-widget,jquery-ui-mo…:3)
The errors you’re seeing can happen due to a couple of things. These include plugin conflicts as well as plugins that either defer loading of scripts or push scripts to the footer or in some other way alter the way that ACF scripts are loaded.
You must be logged in to reply to this topic.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.