Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.For various forms within the Aegir system, it would be nice to provide autocomplete text fields so users can select site names. Let's place this functionality within Sites, as that's where it should go.
In order to work with these values, we need to be able to figure out the node ID of the selected site from the selected name so that we can do something with it.
I'll have a patch for this in a minute.











Comments
Comment #2
colanComment #3
colanTo see a use case for this, see #2712701: Make settings fields user-friendly instead of requesting node IDs.
Comment #4
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedhosting_get_site_by_url() is used in a few places: http://api.aegirproject.org/api/Hosting/site!hosting_site.module/functio...
Your version uses the DB API, which is of course better, so as long as you already wrote the code we could swap it in. The original function returns the whole node though, it would be important not to change this if we go that way.
Comment #5
colanHopefully this patch gives us what we want.
I made the following changes:
Comment #7
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedWorks great, committed.