Home › Forums › Front-end Issues › Uncaught TypeError: Cannot read property 'query' of undefined › Reply To: Uncaught TypeError: Cannot read property 'query' of undefined
Hello, I receive exactly the same error: I am using the gallery field in a front end form. When clicking on “Add to Gallery” nothing happens, the Chrome console throws the following error message (see below). Adding the line “wp_enqueue_media();” in the page template before the ACF form leads to the exact error (displayed in the front end media upload form) mentioned by Karush, i.e. “Sorry you are not allowed to upload files”.
What else can I do? I am using the latest ACF Pro 5.11.4 version.
Thanks!
Ralph
“acf-input.min.js?ver=5.11.4:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘query’)
at n.addFrameStates (acf-input.min.js?ver=5.11.4:1)
at n.initialize (acf-input.min.js?ver=5.11.4:1)
at n.e (acf.min.js?ver=5.11.4:1)
at n.acf.Model (acf.min.js?ver=5.11.4:1)
at n [as constructor] (acf.min.js?ver=5.11.4:1)
at new n (acf.min.js?ver=5.11.4:1)
at Object.acf.newMediaPopup (acf-input.min.js?ver=5.11.4:1)
at n.onClickAdd (acf-pro-input.min.js?ver=5.11.4:1)
at n.<anonymous> (acf.min.js?ver=5.11.4:1)
at HTMLAnchorElement.i (jquery.min.js?ver=3.6.0:2)”
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.