01-09-2017 11:24 PM
Hello,
as I understand - when I want to check duplicity during new site creation in Alfresco 5.1.1, I will use siteService.hasSite(shortname) which will go through all sites (even Private ones) and give me true/false result. This hasSite even checks sites in Trashcan where deleted sites with possible same shortname might be located.
BUT in my case siteService.hasSite returns "ok" result even if the site is already in trashcan and is letting me to create site with once used shortname of site in Trashcan which might lead to future issues for users using such "duplicated" site.
I've tried to locate hasSite in classes in alfresco-repository-5.1.1.jar file but I was not able to find particular source code to see what this is doing and why does it not check trashcan or what does this query looks like.
Have someone experienced same behavior or have ideas why it's not checking the trashcan? Could this be related to index settings for archive://SpacesStore ?
Thank you very much.
Best regards
Vojtech
01-09-2017 11:58 PM
I did not get a chance to debug through the code.However, you should be able to take a look at the source code at https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/5.1.a/root/projects/repos...
For other community versions, it can be traversed from https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS
Hope this helps.
01-10-2017 12:11 AM
As an FYI, you might be interested to know that this is a feature that is actually coming in 5.2... we've updated the site creation dialog to use a new Aikau version that performs dynamic checking to see whether or not the suggested site title and short name has already been used (and also checks private sites).
01-10-2017 04:34 AM
That is great to know. Thanks!
01-10-2017 06:06 AM
You meant to say that feature is already here. 5.2 GA shipped - only Enterprise folks have to wait a bit longer...
Explore our Alfresco products with the links below. Use labels to filter content by product module.