Hi,
To be honest I don't know why it has this kind of thing for selection logic:
|| ((isSiteEditor) && (siteSettings.SiteRootEditRoles.LastIndexOf(listItem.Value + ";") > -1))
I probably had some reason for doing that at some point but it seems incorrect today. I've commented that part out and committed to the repository. I also fixed a bug in the parent page dialog which was not showing any pages for site editors in child sites.
I've got a family event the rest of the day but tomorrow I will do some thorough testing on the scenario of related sites mode and child site editors and look for any other things that are not working as expected. I admit I'm not using related sites mode in any of my own sites so it has not been something I've been testing frequently and is overdue for some review.
Q2: Since all of our roles were defined in the root site before a child side was created, the list of roles to choose as Site Editor are the default ones. SiteSettings.aspx.cs uses selectedSite to get a list of roles to display. I think it would make sense to check if UseRelatedSiteMode is enabled and display roles from the site specified by the RelatedSiteID key maybe?
Roles are consistently used in all cases in related sites mode as far as I know because with related sites mode enabled the Role.GetSiteRoles method is using the related site id no matter what site id is passed in.
public static IDataReader GetSiteRoles(int siteId)
{
if (UseRelatedSiteMode) { siteId = RelatedSiteID; }
return DBRoles.GetSiteRoles(siteId);
}
Best,
Joe