Home › Forums › Backend Issues (wp-admin) › [Image field] Cannot read property 'query' of undefined
Hello,
I’m running into a problem with image fields which is preventing me from selecting any image. When I click the Add Image button, I get the following error from the file acf-input.min.js :
Uncaught TypeError: Cannot read property 'query' of undefined
at i.addFrameStates (acf-input.min.js?ver=5.7.3:3)
at initialize (acf-input.min.js?ver=5.7.3:3)
at i.t (acf-input.min.js?ver=5.7.3:1)
at i.acf.Model (acf-input.min.js?ver=5.7.3:1)
at i [as constructor] (acf-input.min.js?ver=5.7.3:1)
at new i (acf-input.min.js?ver=5.7.3:1)
at Object.acf.newMediaPopup (acf-input.min.js?ver=5.7.3:3)
at i.selectAttachment (acf-input.min.js?ver=5.7.3:2)
at i.onClickAdd (acf-input.min.js?ver=5.7.3:2)
at i.<anonymous> (acf-input.min.js?ver=5.7.3:1)
I just downloaded the latest ACF version this morning (5.7.3) and I’ve tried each version back to 5.6.10, each with the same issue. I’ve also tried on a default wordpress theme, and ACF is the only plugin enabled at the moment. Any help would be greatly appreciated.
Possibly related, but I’m also getting Uncaught ReferenceError: QTags is not defined
when the page loads, which I’ve never seen before. Might that be causing an issue?
Thanks
ETA:
I’ve just found a similar issue with link fields. I get the following when I try to select a link
Uncaught ReferenceError: wpLink is not defined
at acf.Model.open (acf-input.min.js?ver=5.7.3:2)
at i.onClickEdit (acf-input.min.js?ver=5.7.3:2)
at i.<anonymous> (acf-input.min.js?ver=5.7.3:1)
at HTMLAnchorElement.d (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=5.0-alpha-43578:2)
at HTMLDivElement.dispatch (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=5.0-alpha-43578:3)
at HTMLDivElement.r.handle (load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,moxiejs,plupload&ver=5.0-alpha-43578:3)
Is this an issue with any ACF fields that open a modal?
Just had a new WordPress update this morning, which seems to have fixed the issue.
The topic ‘[Image field] Cannot read property 'query' 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.