Home Forums Front-end Issues Uncaught TypeError: Cannot read property 'query' of undefined


Uncaught TypeError: Cannot read property 'query' of undefined

    • tabboy

    • September 30, 2015 at 12:03 am

    I get this error on line 4895 of acf-input.js when I click the “Add to Gallery” button.

    var Query = options.library );

    This only occurs with the latest version of Chrome (45.0.2454.101 m) but is working on Firefox.

    Weird thing is that it works with the same version of Chrome using a local install of the same website with WAMPSERVER.

    I raised a support call about this but haven’t heard anything for a week…

  • Hi @tabboy

    Do you also have the latest version of WordPress and ACF? ACF Pro?

    • tabboy

    • October 1, 2015 at 8:49 am

    Yes I have the latest versions of both. I’ve raised this as a bug but I haven’t heard back for a couple of weeks.

  • Okay. Does the error disable the gallery button completely or is it just something that appears in the console while everything still works?

    • tabboy

    • October 1, 2015 at 4:32 pm

    The error disables it completely and I can’t select any files for upload.

  • Hm okay,
    Could you try disabling all other plugins to make sure it’s not some interference?

    The error says doesn’t even exists.. so this happens when you click the “Add to gallery” button for a gallery field. But where? Is it on a post/page or something else?

    • tabboy

    • October 1, 2015 at 4:54 pm

    It works with the same plugins on WAMPSERVER with Chrome but not on a hosted web server. Firefox works fine.

    Here is the where the gallery button is on a page.

    Fails when I use Chrome on this page hitting the add to gallery button.

  • Okay,

    Can you provide a temporary login for me to try with? Currently it just tells me to login. You can post it as private here so only me and my coworkers in the forum can see it.

    • tabboy

    • October 1, 2015 at 8:24 pm
    This reply has been marked as private.
  • This reply has been marked as private.
    • tabboy

    • October 2, 2015 at 8:53 am
    This reply has been marked as private.
  • Okay so I’ve tested now in both FF and Chrome (Version 45.0.2454.101) and I’m not getting the same error. I’m not getting any error but a few warnings about origins and the media button works.

    Is it possible you have some cached stuff in your browser? Perhaps you have an antivirus/malware-protection on your computer which does strange things (I’ve seen that before).

    • tabboy

    • October 3, 2015 at 3:24 pm

    I’ve cleared all the browsing history and cache and it still doesn’t work in Chrome. It’s working on my mobile phone using Chrome but I have had other users claiming they also can’t add to the gallery with the Chrome browser…

    Not sure where to go next with troubleshooting this…

  • Hmm okay. You’re not experiencing the same issue with the regular media button in WP?

    If you add a wysiwyg field and click the media button, nothing?
    If you add a file field and click it? Image field?

    • tabboy

    • October 6, 2015 at 9:25 pm

    I have a file field that displays in Firefox as the wp file uploader but in Chrome it displays as the basic type.

    • tabboy

    • October 7, 2015 at 6:28 pm

    I’ve also tried it on tablet running Chrome and it doesn’t work. Tried it on my work PC and Chrome doesn’t load the media button on the single image upload.

  • I have a file field that displays in Firefox as the wp file uploader but in Chrome it displays as the basic type.

    So the file field is also not working properly in Chrome?

    I really don’t know what to tell you.. it works however and with whatever browser I try it and I’ve not encountered anyone with the same issue. I will assign @elliot to this topic too to see if he has any input.

    • tabboy

    • October 8, 2015 at 10:36 am

    That’s correct, it doesn’t work on any Chrome browser I have tried. I’m going to try and duplicate the site again and run it from my localhost because it has worked from there previously.

  • Okay let me know how it turns out.
    It sounds to be like some local problem with your chrome installation.. but still weird.

    • tabboy

    • October 14, 2015 at 11:09 am

    Not sure because the same chrome browser will display the controls on a localhost version of the site…

    • tabboy

    • April 20, 2016 at 10:41 pm

    This is still an issue. I opened up a private thread with James but I have no idea how to respond to him now…

  • Hi Tabboy,

    Alright. I’m not sure since I’ve not used private threads at all yet 🙂

    You say it works in the same browser on a localhost tho. that kind off leads to the issue being with the specific server you’re hosted on.

    • tabboy

    • April 21, 2016 at 9:04 am

    It seems that way. I sent a login to one of the other support stuff on PM to see if he can replicate the issue. Do you want one also?

  • Thanks but at the moment I’m not as active support. I’m sure if you remind James he’ll help you out!

  • Hello,
    Has this issue been solved because I am getting the same error?

    Update: It’s ok. I’ve found the problem. It’s a user permission thing. I have to give file upload permission to non-admin users.

Viewing 25 posts - 1 through 25 (of 35 total)

You must be logged in to reply to this topic.

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.