The issue appears when using ACF PRO, and the repeater field with an image, or just a standard image field (so suspecting upload a file). I have used this many times before on previous ACF versions, so must just be ACF PRO. I click to upload an image, but nothing happens. I have checked the console and there’s a jQuery UI errors happening per click.
Uncaught TypeError: undefined is not a function input.min.js?ver=5.0.3:1
I have Quickcast’d the issue so hope this helps somewhat.
This happens on both local and development servers.
Hi @rdck
Thanks for the bug report. Can you please enable debug scripts to load the full JS file and report back with the JS error? This will give us the correct line number to look at.
in wp-config.php define('SCRIPT_DEBUG', true);
Thanks
E
Hi, we’re seeing the same issue on a client’s site. Here’s the error with line number.
Uncaught TypeError: undefined is not a function http://www.sitenamehere.dev/wp-content/plugins/advanced-custom-fields-pro/js/input.js?ver=5.0.4:1252
Hi @shoshanna
Thanks for the info. The line in question is this:
new wp.media.controller.EditImage()
What version of WP are you running on the site?
Thanks @shoshanna
I’ve just added in some logic around those lines to avoid the error. It seems I was relying on a WP component that was added in 3.9.
Here’s the latest JS files. Can you please replace them and let me know if it fixes the issue.
Thanks
E
I’ll advise the client to upgrade core. Thanks for looking into it!
That patch worked to fix the image upload, however it seems to have somehow triggered another issue. I also have Page Link fields in the same group. Without the patch applied, I can select a page link but can’t upload an image. With the patch, I can upload an image but I just get “Searching..” when selecting a page.
I’m seeing this error:
Uncaught TypeError: Cannot read property ‘length’ of null clientname.staging.wpengine.com/wp-includes/js/jquery/jquery.js?ver=1.10.2:3
Hi @shoshanna
ACF PRO has had a few updates since the start of this thread. Are you able to update ACF PRO to the latest version (5.0.8)?
This should fix your JS issue. Pleas let me know how you go
I’m experiencing a similar issue… when an admin post edit page loads, I get this error:
Uncaught TypeError: Cannot read property ‘post_id’ of null
input.js?ver=4.4.5.:991
…then when I try to use the “Add Image” button, I get this error:
Uncaught TypeError: Cannot read property ‘image’ of null
input.js?ver=4.4.5.:2597
OK simply logging out and back in solved this issue for me 🙂
Thanks for making a great plugin!
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 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.