cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete orphaned 'site_' groups

almoehi
Champ on-the-rise
Champ on-the-rise
Hi,

every site has some system groups attached to it (site_…). In my installation, deleting a site via "My Sites" dashlet does not delete those groups, nor is it possible to delete them from admin tools.
Is this intended behaviour (I doubt it) or is it a bug (in my system maybe)?

In the log I found the following line that might be related:

ERROR [org.springframework.extensions.webscripts.AbstractRuntime] [ajp-bio-8009-exec-39] Exception from executeScript - redirecting to status template error: 06220025 Script url /api/groups does not support the method DELETE
org.springframework.extensions.webscripts.WebScriptException: 06220025 Script url /api/groups does not support the method DELETE


Your help is really appreciated.

Alex
7 REPLIES 7

sujaypillai
Confirmed Champ
Confirmed Champ
Hi,

Yes deleting a site doesn't delete the system groups associated with it and its the default behavior of Alfresco.

Why would you want to have that deleted?

almoehi
Champ on-the-rise
Champ on-the-rise
Hi Sujay,

thanks for your reply.

<blockquote>
Why would you want to have that deleted?
</blockquote>

Because they're crowding the group list for nothing. For me, as I like to browse the list instead of using the search function, it makes life harder. Furthermore I think it would be reasonable to delete them (automatically at best). Imagine some Alfresco installation with frequent site creation and removal. We'll end up having hundreds of useless groups.
However, you say it's default behaviour, so I probably have to live with it.

Thanks again and best wishes,
Alex

angelborroy
Community Manager Community Manager
Community Manager
I don't know the real reason (if any) not to delete associated groups on site deletion. However, you can develop a behaviour in order to get this operation performed automatically associated to site deletion.
Hyland Developer Evangelist

s_palyukh
Star Contributor
Star Contributor
I believe, when you delete site from trashcan then groups will be removed automatically. To do it go to admin profile and then to Trashcan tab -> http://localhost:8080/share/page/user/admin/user-trashcan after that to click "Clean" button to remove all files from Trashcan or to choose site and click "Delete"

sujaypillai
Confirmed Champ
Confirmed Champ
I am not sure deleting from trashcan removes those site groups. But this is an alternative way -

1. Go to Admin Console > Node Browser
2. Enter "/sys:system/sys:authorities" (without double quotes) in text field with XPATH as Search parameter & Store as "workspace://SpacesStore"
3. This would give you the nodeRef for sys:authorities
4. Navigate to all the children items (Please refer the attached screenshot)
5. Find the nodeRef for the group you want to delete [say workspace://SpacesStore/9547dd03-6f8c-48f4-8c92-b16478ab8df0 ]
6. execute the below command -

curl -u admin:admin -X "DELETE" http://localhost:8080/alfresco/service/api/archive/workspace/SpacesStore/9547dd03-6f8c-48f4-8c92-b16...

{
   "data":
   {
      "purgedNodes":
      [
         {
            "nodeRef": "Node no longer exists: workspace://SpacesStore/9547dd03-6f8c-48f4-8c92-b16478ab8df0"
         }
      ]
   }
}

This would delete the group.

***Please test it on a local box before you do it on production box

I am sure! Just tested it on alfresco 5.0.d. As I understand groups aren't removed for site recovery functionality

almoehi
Champ on-the-rise
Champ on-the-rise
Hi all,

thanks for your excellent support. I went for s.palyukh's solution and it worked, at least for those sites I deleted recently. Some groups of long gone sites still remain, and I'm going to try Sujay's suggestion to get rid of them, too.

All the best,
Alex