After a thorough investigation of the problem with the sitemap, I identified that the user manager was not structured properly in the database. To fix the error, we corrected the manager of each user and ran tests to check for any further issues. Thankfully, there were no further problems and the sitemap is now functioning properly.