cancel
Showing results for 
Search instead for 
Did you mean: 

List of Sites and their Members

parkea07
Champ in-the-making
Champ in-the-making
Hello All,

I get this error message when i run this script:

Please correct the errors below then click Finish.
Failed to run Actions due to error: 00161191185 Failed to execute script 'workspace://SpacesStore/607264e5-ec14-464b-bfbd-cf77b043bc8b': 00161191184 An authority was not found for GROUP_site_enfold_SiteCollaborator 


it works when i only get a list of sites, but it seems to no work when i try to get the members too.

I am running this script from the Sites Folder.
10 REPLIES 10

parkea07
Champ in-the-making
Champ in-the-making
Here is my script

scouil
Star Contributor
Star Contributor
It looks like it's failing when searching members in one of the groups of the site.
Can you please check that the group for the site "enfold" has a subgroup for siteCollaborator and that it wasn't removed by mistake
Would it crash if you used listMembers(null, null, 0, false)
or if you had at least 1 user in each of the groups of the site (1 for each role)

Also, what's your alfresco version?

parkea07
Champ in-the-making
Champ in-the-making
the Version is 4.1.1

The listmembers method no matter the type of parameters i set, will not work.Would this be an issue to how our sites were created?

parkea07
Champ in-the-making
Champ in-the-making
members = sites.listMembers("", "", 0, false);

Still got the same error message

Please correct the errors below then click Finish.
Failed to run Actions due to error: 00171307502 Failed to execute script 'workspace://SpacesStore/df1c99ef-307c-479c-be21-813ab666897e': 00171307501 An authority was not found for GROUP_site_enfold_SiteCollaborator

parkea07
Champ in-the-making
Champ in-the-making
members = sites.listMembers("", "", 0, false);

Still got the same error message

Please correct the errors below then click Finish.
Failed to run Actions due to error: 00171307502 Failed to execute script 'workspace://SpacesStore/df1c99ef-307c-479c-be21-813ab666897e': 00171307501 An authority was not found for GROUP_site_enfold_SiteCollaborator

scouil
Star Contributor
Star Contributor
I don't have any 4.1.1 installed so I went with a 4.1.2 instance.
I went with the following script
<blockcode>
var sites = siteService.listSites(null,null);
for(var i = 0; i<sites.length;i++) {
   logger.log(sites)
   var siteMembers = sites.listMembers(null, null, 0, true);
   for (var authorityName in siteMembers) {
      logger.log("–"+authorityName);
   }
}
</blockcode>
That is a simplified version of your that I was too lazy to fully rewrite.

Works like a charm for me.
Could you please test it in your environment?

parkea07
Champ in-the-making
Champ in-the-making
Hey Scouil,

I tried your script out and i still got the authority error

Please correct the errors below then click Finish.
Failed to run Actions due to error: 0021153589 Failed to execute script 'workspace://SpacesStore/df1c99ef-307c-479c-be21-813ab666897e': 0021153588 An authority was not found for GROUP_site_enfold_SiteCollaborator 

the must be an issue to how the sites were created.

scouil
Star Contributor
Star Contributor
Hi,

So yes I believe your "enfold" site has something wrong.
I'd go with the fact that the collaborator group for it has been removed.
Sorry to ask for the same check again but
Can you please check that the group for the site "enfold" has a subgroup for siteCollaborator and that it wasn't removed by mistake
(through the admin panel browse to the "enfold (GROUP_site_enfold)" group and look at the subgroups)

PS; if this site was just copied through a migration or manually created in companyhome > Sites > enfold , that is probably the cause of the bug.

parkea07
Champ in-the-making
Champ in-the-making
I have confirmed that the site enfold has errors in the properties. We are going to send a ticket to Alfresco about this particular site. The site itself could not be accessed, but appears to still resides in the site folder. Thanks for your help