Node with long name/path

Enonic version: 6.12.2
OS: Linux

Hi !

I’m having a strange issue. When I try to query a node I got total results 4, but empty hits array. After some testing/debug I found that this is depends on node name. I tried with a name “Virkning av ulike slåtte og beiteopplegg på produksjon og botanisk sammensetning på kort- og langvarig grasmark”. Everything works fine in Repo XPlorer. Can anybody confirm if this is a bug ?

Thanks !

Could you post your query and result details maybe?

Hi @tsi,

This is my query:

libs.content.query({
  start: 0,
  count: 1,
  query: 'data.PUBLICATION_ID = "manual_10607" AND language = "no" AND _parentPath LIKE '/content/site/publications/manual-publications*'',
  contentTypes: [
   app.name + ":publication"
  ]
});

And this is what I get from system:

{
    "total": 7,
    "count": 0,
    "hits": [],
    "aggregations": {}
}

I have 7 publications with same ID because during publications import system report that value “content” equals to 0.

Hi, sry - this went under the radar.

I guess the point of the query is to verify if any content with the same “id” exists; you can set the count to 0 and check the total, the count is the number of items to be returned, the total will always contain the total number of issues matching the query.

We’ll check what could be the issue tomorrow :slight_smile:

Hi @rmy,

It’s not a problem for me. I already changed code to check only total value. But this could be a bug.

1 Like