• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Draft / ACF Uncaught TypeError: Cannot read property ‘id’ of undefined

ACF Uncaught TypeError: Cannot read property ‘id’ of undefined

Last updated on April 8, 2019 by Sal Ferrarello

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.

Solution

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.

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit
Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Solution Tagged With: ACF, Advanced Custom Fields, WordPress, WordPress Plugin

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in