<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error with REST request (site memberships) in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289209#M242339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a public site in alfresco and I am trying to add members through the REST API. Bu the request I'm using is throwing an HTTP 500 error code. Here is the path I'm using: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@PUT /alfresco/service/api/sites/mysite/memberships&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{"person":{"userName":"daniel"},"role":"SiteCollaborator"}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this is the error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; &lt;BR /&gt;{ "status" : { "code" : 500, "name" : "Internal Error", "description" : "An error inside the HTTP server which prevented it from fulfilling the request." }, "message" : "00280029 Wrapped Exception (with status template): 00280076 Error during processing of the template 'When calling macro \"membershipJSON\", required parameter \"role\" (parameter #2) was specified, but had null\/missing value.\n\nTip: If the parameter value expression on the caller side is known to be legally null\/missing, you may want to specify a default value for it with the \"!\" operator, like paramValue!defaultValue.\n\nThe failing instruction:\n==&amp;gt; @membershipLib.membershipJSON site=si… [in template \"org\/alfresco\/repository\/site\/membership\/memberships.post.json.ftl\" at line 2, column 1]'. Please contact your system administrator.", "exception" : "org.springframework.extensions.webscripts.WebScriptException - 00280029 Wrapped Exception (with status template): 00280076 Error during processing of the template 'When calling macro \"membershipJSON\", required parameter \"role\" (parameter #2) was specified, but had null\/missing value.\n\nTip: If the parameter value expression on the caller side is known to be legally null\/missing, you may want to specify a default value for it with the \"!\" operator, like paramValue!defaultValue.\n\nThe failing instruction:\n==&amp;gt; @membershipLib.membershipJSON site=si… [in template \"org\/alfresco\/repository\/site\/membership\/memberships.post.json.ftl\" at line 2, column 1]'. Please contact your system administrator.", "callstack" : [ "" ,"freemarker.core._MiscTemplateException: When calling macro \"membershipJSON\", required parameter \"role\" (parameter #2) was specified, but had null\/missing value.\n\nTip: If the parameter value expression on the caller side is known to be legally null\/missing, you may want to specify a default value for it with the \"!\" operator, like paramValue!defaultValue.\n\nThe failing instruction:\n==&amp;gt; @membershipLib.membershipJSON site=si… [in template \"org\/alfresco\/repository\/site\/membership\/memberships.post.json.ftl\" at line 2, column 1]" ,"freemarker.core.Macro$Context.sanityCheck(Macro.java:249)" ,"freemarker.core.Macro$Context.runMacro(Macro.java:206)" ,"freemarker.core.Environment.visit(Environment.java:694)" ,"freemarker.core.UnifiedCall.accept(UnifiedCall.java:116)" ,"freemarker.core.Environment.visit(Environment.java:265)" ,"freemarker.core.MixedContent.accept(MixedContent.java:93)" ,"freemarker.core.Environment.visit(Environment.java:265)" ,"freemarker.core.Environment.process(Environment.java:243)" ,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:218)" ,"org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:955)" ,"org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)" ,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)" ,"org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:433)" ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:454)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:563)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:343)" ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)" ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)" ,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)" ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:727)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)" ,"org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)" ,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)" ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)" ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)" ,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)" ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)" ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)" ,"org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)" ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)" ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)" ,"org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)" ,"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)" ,"org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)" ,"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)" ,"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)" ,"java.lang.Thread.run(Thread.java:745)" ,"org.alfresco.service.cmr.repository.TemplateException: 00280076 Error during processing of the template 'When calling macro \"membershipJSON\", required parameter \"role\" (parameter #2) was specified, but had null\/missing value.\n\nTip: If the parameter value expression on the caller side is known to be legally null\/missing, you may want to specify a default value for it with the \"!\" operator, like paramValue!defaultValue.\n\nThe failing instruction:\n==&amp;gt; @membershipLib.membershipJSON site=si… [in template \"org\/alfresco\/repository\/site\/membership\/memberships.post.json.ftl\" at line 2, column 1]'. Please contact your system administrator." ,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:222)" ,"org.springframework.extensions.webscripts.WebScriptException: 00280029 Wrapped Exception (with status template): 00280076 Error during processing of the template 'When calling macro \"membershipJSON\", required parameter \"role\" (parameter #2) was specified, but had null\/missing value.\n\nTip: If the parameter value expression on the caller side is known to be legally null\/missing, you may want to specify a default value for it with the \"!\" operator, like paramValue!defaultValue.\n\nThe failing instruction:\n==&amp;gt; @membershipLib.membershipJSON site=si… [in template \"org\/alfresco\/repository\/site\/membership\/memberships.post.json.ftl\" at line 2, column 1]'. Please contact your system administrator." ,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1126)" ], "server" : "Community v5.0.0 (r75118-b23) schema 8,001", "time" : "28-Jan-2015 10:24:58" }&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I missing here? Is this a bad server configuration?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jan 2015 10:48:05 GMT</pubDate>
    <dc:creator>hferreira</dc:creator>
    <dc:date>2015-01-28T10:48:05Z</dc:date>
    <item>
      <title>Error with REST request (site memberships)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289209#M242339</link>
      <description>I have created a public site in alfresco and I am trying to add members through the REST API. Bu the request I'm using is throwing an HTTP 500 error code. Here is the path I'm using: @PUT /alfresco/service/api/sites/mysite/memberships{"person":{"userName":"daniel"},"role":"SiteCollaborator"}And this</description>
      <pubDate>Wed, 28 Jan 2015 10:48:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289209#M242339</guid>
      <dc:creator>hferreira</dc:creator>
      <dc:date>2015-01-28T10:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error with REST request (site memberships)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289210#M242340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is critical when you do a PUT against this URL that you pass the content-type header with a value of "application/json". If you do not, you will see that error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 22:16:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289210#M242340</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2016-09-21T22:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error with REST request (site memberships)</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289211#M242341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of how to do it through POSTMAN Rest Client&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Adding a sitemeber with specific role" class="image-3 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/9560_sc3.PNG" style="width: 620px; height: 159px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and as &lt;B&gt;Jeff Potts&lt;/B&gt;‌ mentioned here are the 2 headers to be passed&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Headers for sitemembership POST call" class="image-2 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/9559_sc4.PNG" style="width: 620px; height: 119px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 05:48:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/error-with-rest-request-site-memberships/m-p/289211#M242341</guid>
      <dc:creator>sujaypillai</dc:creator>
      <dc:date>2016-09-22T05:48:27Z</dc:date>
    </item>
  </channel>
</rss>

