AnsweredAssumed Answered

Can create site from share UI, not from command line.

Question asked by jocylincouch on Sep 3, 2014
Latest reply on Sep 4, 2014 by jocylincouch
Using OOTB Alfresco 5 Community edition running on Ubuntu14.04

Steps: Create site through the share UI. Copy request as curl from Chromium developer tools. Reconstructed request in python requests library as:'http://<IP>:8080/share/service/modules/create-site',data=site_data,cookies=THE_cookie

Where THE_cookie was obtained via a POST to http://:8080/share/page/dologin, which gave a 200, and site_data has different names to the site created through the share UI.

That request gave a 500 error stating that

u'freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:\n==> success  [in template "org/alfresco/modules/" at line 2, column 17]\n\nTip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (!myDefault, (\n\nThe failing instruction:\n==> ${success?string}  [in template "org/alfresco/modules/" at line 2, column 15]', …

When in Chromium, there is no response, but a site is created successfully.

I've also not got the curl request from the command line to work – it needs the CSRF token removed, then gives a 200 and does nothing; no logs. My understanding is that Alfresco always gives a 200 on a successful request regardless of whether it's a GET or POST.

If anyone has any ideas that would be amazing. There doesn't seem to be anything that we can do to get create-site to work outside of the share UI, but we absolutely need it to do so. I know I've asked this on StackExchange, however there have been no answers and I have spent some considerable time going through the code.