Recently I was working on a site using Advanced Custom Fields (ACF) but the field input boxes had stopped working.
In the browser console, I saw the error
ACF Uncaught TypeError: Cannot read property ‘id’ of undefined
Advanced Custom Fields and Select2
Advanced Custom Fields uses the Select2 library (
version 4), however another plugin was loading Select2 (
version 3). WordPress loaded the first one registered which happened to be
version 3, which caused the problem.
This ACF support thread about
Uncaught TypeError: Cannot read property 'id' of undefined, was helpful in diagnosing this issue.
Deactivating the plugin loading Select2
version 3 is a short-term solution. Then hopefully, you can then update the offending plugin to a newer version that uses Select2
version 4 or find another plugin.