While trying to implement my own ExternalAddressBook, I’m stumbling to understand how stuff should work.
To understand a plugged-in addressbook, I installed and configured ldap_contacts_backend, but this doesn’t work either as expected; no contacts from LDAP showing up. Actually, even the system contacts are missing (although enabled in settings/groupware).
From the official documentation here, I understand that a backend must `IManager:register()` a callable at boot time for later registration, which is what ldap_contact_backend does in Application.php. DAV does so as well, so after startup there are two callables present in ContactsManager::addressBookLoaders[].
When using the contacts app, I’d expect the calllables to register their addressbooks eventually, but `loadAddressBooks()` is never called with Mail and Contacts apps.
After a lot of trying, I finally succeeded triggering `loadAddressBooks()`, by hitting the Universal Search button. Now I can see that `ContactsManager::search($pattern=””)` collects a total of 48 contacts from the system addressbook, the LDAP addressbook and a manual one. typing the search field doesn’t trigger any more searches, still no card results are displayed in the Universal Search box; only file results.
Versions are latest: PHP8.4, NC32.0.5, Contacts 8.3.2, ldap_contacts_backend 1.1.12, no errors in nextcloud.log.
Ideally, you have a public test code that we can look at (or even install on a dev environment)?
A quick glance on the server code shows that you should look for getUserAddressBooks() which in turn is triggered in the contacts app. But I have never used that API, so this is just static code analysis.
Would you mind filing a basic PR or at least a clearly formulated issue) against the LDAP extension to help them fix this issue on their side? Ideally, post a link here.