The search service with users fails when the root page of directory is configured with a depth of 0.
How to reproduce
- Create some users
- Create a page and set it as the root of user directory with the following parameters :
- Type of content : user of directory
- Classification: Name
- Depth: 0
- Insert the search service and select "Users" for search element. I add criteria on firstname and lastname
- Do a search
An error occurred
java.lang.IllegalArgumentException: The page associated to the user content '/ametys:plugins/contentio/ametys:contents/laurence-aumeunier-2' (content://0cc98388-7054-4a03-bd86-784b0f7c8e4b) cannot be found in the current site and sitemap (www / fr) for one of the content types [org.ametys.plugin.defaultud.Content.uduser] at org.ametys.plugins.userdirectory.service.search.UserReturnable$UserSaxer._resolveUserPage(UserReturnable.java:269) at org.ametys.plugins.userdirectory.service.search.UserReturnable$UserSaxer.sax(UserReturnable.java:155) at org.ametys.web.frontoffice.search.requesttime.impl.SaxResultsSearchComponent.saxHit(SaxResultsSearchComponent.java:150) at org.ametys.web.frontoffice.search.requesttime.impl.SaxResultsSearchComponent.saxHits(SaxResultsSearchComponent.java:120) at org.ametys.web.frontoffice.search.requesttime.impl.SaxResultsSearchComponent.execute(SaxResultsSearchComponent.java:73) at org.ametys.web.frontoffice.search.requesttime.SearchServiceGenerator.generate(SearchServiceGenerator.java:174)