Drupal and Web Development Tidbits

Debugging Entity Auto Complete Field

April 11, 2021

Written by: Jon Kamke

Where the ajax callback happens in code.

Recently I needed to look into how the autocomplete worked with the Link field. After a lot of digging through code and step debugging, I finally figured out where the Ajax callback was and then could see how the query is put together.

The route


is defined in /core/modules/system/system.routing.yml with the key system.entity_autocomplete. The callback is in


From here you can figure out how the query is put together or what ever else you need to know.