How to get list of sites on replication receiver node
I have replicated 'Sites' folder of Data Dictionary through replication job, So, whenever i create new site, all the data are replicated to receiver node. Its working fine.
On user dashboard page, my sites dashlet is not showing sites that are replicated from source repository and even /api/sites API giving below exception:
"message" : "05160056 Wrapped Exception (with status template): 05163229 Error during processing of the template 'Method public org.alfresco.repo.jscript.ScriptableHashMap org.alfresco.repo.site.script.Site.listMembers(java.lang.String,java.lang.String,int,boolean) threw an exception when invoked on org.alfresco.repo.site.script.Site object \"org.alfresco.repo.site.script.Site@b8fcef5\" with arguments of types [java.lang.String,java.lang.String,java.lang.Integer,java.lang.Boolean,]. See cause exception.\n\nThe failing instruction (print stack trace for 2 more):\n==> #assign managers = site.listMembers(\"... [in template \"org\/alfresco\/repository\/site\/site.lib.ftl\" in macro \"siteJSONManagers\" at line 48, column 17]'. Please contact your system administrator.",
In Server side log:
Caused by: org.alfresco.repo.security.authority.UnknownAuthorityException: 05164576 An authority was not found for GROUP_site_testing_SiteManager
I have created site with admin user and checking with admin user on source and target repository.
Re: How to get list of sites on replication receiver node
The replication service is not meant for this. In all honesty, the out-of-the-box replication service isn't really good for much. I would avoid it.
I stand by that statement even for replicating plain old files and folders. But in your case, you are trying to replicate entire SITES. A site is more than just a folder--a site has a collection of Share configuration XML files as well. I think it is unlikely that the replication service will be able to replicate a site and have it continue to function on the replication servers.
One of my clients tried using the out-of-the-box replication service for entire sites and it failed miserably. We ended up using a third-party solution from Parashift called AlfSync.