01-10-2017 02:24 AM
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-10-2017 02:58 AM
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 03: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 07:34 AM
That is great to know. Thanks!
01-10-2017 09:06 AM
You meant to say that feature is already here. 5.2 GA shipped - only Enterprise folks have to wait a bit longer...
01-10-2017 09:09 AM
Yes, that is true
Explore our Alfresco products with the links below. Use labels to filter content by product module.