<?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 Root object person.getPerson seems to not work properly in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/root-object-person-getperson-seems-to-not-work-properly/m-p/137366#M36848</link>
    <description>&lt;P&gt;Hello everybody!&lt;/P&gt;&lt;P&gt;I'm writing to get some help or some idea about why something is happening in my Alfresco Content Service environment. I have built some extensions over my instance using Javascript based Webscripts. All of them work perfectly, however I do have one exception. The problem is: in one webscript I invoke the Javascript root object person.getPerson (&lt;A href="https://github.com/Alfresco/docs-alfresco/blob/master/_archive/content-services/5.2/references/API-JS-getPeople.md" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/docs-alfresco/blob/master/_archive/content-services/5.2/references/API-JS-getPeople.md&lt;/A&gt;) in this way:&lt;/P&gt;&lt;PRE&gt;var userNodes = people.getPeople(null,0);&lt;/PRE&gt;&lt;P&gt;And it doesn't return anything, however, I do have some users registered in my instance. Also, I can see all of them using the node browser and the following Alfresco-CMIS query:&lt;/P&gt;&lt;PRE&gt;SELECT * FROM cm:person&lt;/PRE&gt;&lt;P&gt;I tried to test the same webscript in a test instance and it worked without problems. So, I don't think the code is the problem. In addition, I have read the implementation of the root object (&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/jscript/People.java#L543" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/jscript/People.java#L543&lt;/A&gt;). And I discover that, "under the hoods", the code creates the following FTS query and passes it to the SearchService:&lt;/P&gt;&lt;PRE&gt;TYPE:"{http://www.alfresco.org/model/content/1.0}person" AND ("***")&lt;/PRE&gt;&lt;P&gt;I tried to verify this query in the node browser too and it didn't return anything too. I also tried to remove the "AND ("***")" snippet from the query and then it worked without any problems.&lt;/P&gt;&lt;P&gt;Do someone know what could be and why the query without "AND ("***")" works properly?&lt;/P&gt;&lt;P&gt;Some informations about my environment:&lt;/P&gt;&lt;P&gt;Alfresco's version: 6.2&lt;/P&gt;&lt;P&gt;Edition: Community&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2024 15:43:28 GMT</pubDate>
    <dc:creator>felipe-neves</dc:creator>
    <dc:date>2024-01-15T15:43:28Z</dc:date>
    <item>
      <title>Root object person.getPerson seems to not work properly</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/root-object-person-getperson-seems-to-not-work-properly/m-p/137366#M36848</link>
      <description>&lt;P&gt;Hello everybody!&lt;/P&gt;&lt;P&gt;I'm writing to get some help or some idea about why something is happening in my Alfresco Content Service environment. I have built some extensions over my instance using Javascript based Webscripts. All of them work perfectly, however I do have one exception. The problem is: in one webscript I invoke the Javascript root object person.getPerson (&lt;A href="https://github.com/Alfresco/docs-alfresco/blob/master/_archive/content-services/5.2/references/API-JS-getPeople.md" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/docs-alfresco/blob/master/_archive/content-services/5.2/references/API-JS-getPeople.md&lt;/A&gt;) in this way:&lt;/P&gt;&lt;PRE&gt;var userNodes = people.getPeople(null,0);&lt;/PRE&gt;&lt;P&gt;And it doesn't return anything, however, I do have some users registered in my instance. Also, I can see all of them using the node browser and the following Alfresco-CMIS query:&lt;/P&gt;&lt;PRE&gt;SELECT * FROM cm:person&lt;/PRE&gt;&lt;P&gt;I tried to test the same webscript in a test instance and it worked without problems. So, I don't think the code is the problem. In addition, I have read the implementation of the root object (&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/jscript/People.java#L543" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/java/org/alfresco/repo/jscript/People.java#L543&lt;/A&gt;). And I discover that, "under the hoods", the code creates the following FTS query and passes it to the SearchService:&lt;/P&gt;&lt;PRE&gt;TYPE:"{http://www.alfresco.org/model/content/1.0}person" AND ("***")&lt;/PRE&gt;&lt;P&gt;I tried to verify this query in the node browser too and it didn't return anything too. I also tried to remove the "AND ("***")" snippet from the query and then it worked without any problems.&lt;/P&gt;&lt;P&gt;Do someone know what could be and why the query without "AND ("***")" works properly?&lt;/P&gt;&lt;P&gt;Some informations about my environment:&lt;/P&gt;&lt;P&gt;Alfresco's version: 6.2&lt;/P&gt;&lt;P&gt;Edition: Community&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Felipe&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 15:43:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/root-object-person-getperson-seems-to-not-work-properly/m-p/137366#M36848</guid>
      <dc:creator>felipe-neves</dc:creator>
      <dc:date>2024-01-15T15:43:28Z</dc:date>
    </item>
  </channel>
</rss>

