cancel
Showing results for 
Search instead for 
Did you mean: 

Create site using PHP API

devmehta555
Champ in-the-making
Champ in-the-making
Hi Everybody,

I am trying to integrate alfresco to my php application through API.
I want to create a site from my PHP interface.

I am using following code.

Create Web site

Creates a new Web site based on the site preset and details provided.

POST /alfresco/service/api/sites

The following properties to be set.
shortName - the shortName of the web site, mandatory, must be unique
sitePreset - the sitePreset
title - the title of the web site
description - the description for the web site
visibility - the site visibility, one of (PUBLIC,MODERATED,PRIVATE), defaults to PUBLIC
type - the type of site to create, optional


using this formula I can create website and get this created site in site lists.
But when I tried to access this created website, it throws me following error on browser.



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.
Can anyone help me that how can I solve it?

Thanks in Advance.
Devang Mehta
3 REPLIES 3

devmehta555
Champ in-the-making
Champ in-the-making
And yes,
Once I create some website "demo" from Alfresco Share interface, obviously it works!!!
Now i have deleted this website from Alfresco Share.

Here the strange thing is,
Now if I create site from PHP application with "demo"(same name which we have created and deleted in past from alfresco share interface) name then it works!!!

devmehta555
Champ in-the-making
Champ in-the-making
And yes,
Once I create some website "demo" from Alfresco Share interface, obviously it works!!!
Now i have deleted this website from Alfresco Share.

Here the strange thing is,
Now if I create site from PHP application with "demo"(same name which we have created and deleted in past from alfresco share interface) name then it works!!!

ddanninger
Champ in-the-making
Champ in-the-making
This probably helps you:
http://ecmstuff.blogspot.kr/2011/02/creating-alfresco-share-sites-with.html

you need to create the dashboard