在Ubuntu14.04從python請求庫發佈時出錯;通過露天份額UI
使用開箱即用的露天5 Community Edition上運行步驟不會發生: 通過共享用戶界面建立網站。 將請求複製爲Chromium開發人員工具的curl。在python請求庫 復原請求爲:
s=requests.post('http://<IP>:8080/share/service/modules/create-site',data=site_data,cookies=THE_cookie
在哪裏通過POST到http獲得THE_cookie://:8080 /股/頁/ dologin,這給了200,並site_data有不同的名字到現場通過共享UI創建。
該請求給一個500錯誤,指出
u'freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:\n==> success [in template "org/alfresco/modules/create-site.post.json.ftl" 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: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${success?string} [in template "org/alfresco/modules/create-site.post.json.ftl" at line 2, column 15]', ...
當鉻,沒有任何反應,但成功創建了一個網站。
我也沒有從命令行得到curl請求來工作 - 它需要刪除CSRF令牌,然後給出200並且什麼也不做;沒有日誌。我的理解是,無論它是GET還是POST,Alfresco總是給出一個成功的請求200。
如果有人有任何想法,這將是驚人的。我們似乎沒有什麼能夠讓我們的網站能夠在共享用戶界面之外工作,但我們絕對需要這樣做。