AnsweredAssumed Answered

problem with create-site

Question asked by joemc3 on Oct 10, 2012
I've run into a strange problem when trying to create a site using the Alfresco API.  I'm using the create-site api call.  Code shown below.  The code is working.  When I run this code, the site is created and I can interact with the site, add documents, add members, etc. 

However, after the server reboots, the created alfresco site no longer works.  I can see the site if I search for it, but when I click on the site I get the message:

A server error has occured.

There are a number of reasons why this could have happened:

    You have attempted to access a page that does not exist - check the URL in the address bar.
    You have attempted to access a page that is not accessable to you, such as a private Site dashboard.
    A valid page has been requested but the server was unable to render it due to an internal error - contact your administrator.


Code follows:

            
           string MySite = @"{""visibility"":""" + SiteVisibility + @""",""sitePreset"":""site-dashboard"",""title"":""" +
                SiteTitle + @""",""description"":""" + SiteDescription + @""",""shortName"":""" +
                SiteName + @""",""ticket"":""" + Ticket + @"""}";
            string uri = BaseURI + "/share/service/modules/create-site?alf_ticket=" + Ticket;
            try
            {
                Boolean ReturnStatus = PostData(uri, "application/json", MySite);
                if (!ReturnStatus)
                    return false;
            }
            catch
            {
                return false;
            }

Additionally, when I call the same URI with the same json code through poster (firefox add on), the site seems to persist through a reboot.

Outcomes