Gravatar for bberriz@lifeextension.com

Question by Ben, Nov 10, 2015 1:59 PM

WARN The given item URI is invalid (). The current item could not be loaded.

This is a follow-up to: https://answers.coveo.com/questions/4938/syntax-error-0x80040203-first-time-setup

/coveo/rest returns:

{"totalCount":0,"totalCountFiltered":0,"duration":34,"indexDuration":10,"requestDuration":34,"searchUid":"e6d27a5d-5d3c-4ced-a89d-8e7f961101c4","pipeline":"default","apiVersion":2,"triggers":[],"termsToHighlight":{},"phrasesToHighlight":{},"queryCorrections":[],"groupByResults":[],"results":[]}

The Coveo Diagnostic page shows everything is fine.

The Sitecore log shows the following when I try to reach /coveo/rest:

WARN  The given item URI is invalid (). The current item could not be loaded.

I have already successfully re-indexed everything.

This thread was a dead-end: https://answers.coveo.com/questions/2701/coveorest-shows-totalcount0

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Nov 10, 2015 2:30 PM

The WARN The given item URI is invalid (). The current item could not be loaded. message is normal when you manually load this URL. Normally, the Coveo for Sitecore UI components will call this URL with a sitecoreItemUri query string parameter containing the URI of the search page as stored by the index. The Coveo for Sitecore REST endpoint proxy use that URI to find the current context database.

I have some questions:

  • Are CES and Sitecore on the same machine or separate machines?
  • Which user is reported in the CES Console when you do the query?
  • Which security provider is reported in the CES Console when you do the query?
  • Does that security provider exist in CES?
  • In that security provider, what is the "Sitecore Server URL"?
  • Is this URL valid when typed in a browser on the CES machine? Can this machine access that URL?
  • In the CES index browser, when you expand the details of a Sitecore item, what are the permissions in the "Effective Combined Permissions"?

Thank you, Jeff

Gravatar for bberriz@lifeextension.com

Comment by Ben, Nov 10, 2015 2:55 PM

CES and Sitecore are on same machine

Query @uri performed by extranet\Anonymous [Sitecore Security Provider for MyPC-MySite]. 0 results in 0.01 seconds.

Yes, the security provider exists.

The Sitecore Server Url matches an IIS binding for the site, and it is definitely available.

This last one, the CES index browser, is where it gets interesting. It shows "No user or group to display"

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Nov 10, 2015 3:27 PM

"No user or group to display" is not normal for the permission of indexed Sitecore items. It is supposed to list at least "Anonymous" with allowed to true for generic Sitecore items that should be publicly available. This means that the security is not correctly indexed for the Sitecore items. Thus, the secure queries return no search results.

Possible causes:

  • At the time of the first rebuild, CES was unable to contact the Coveo Security Service (web service inside Sitecore. Uses the Sitecore Server URL) to expand the Sitecore roles and users.
  • CES is still unable to contact the Coveo Security Service.
  • <IndexPermissions> is set to false in the Coveo for Sitecore Coveo.SearchProvider.config file.
  • The Sitecore API is unable to provide the Sitecore security of indexed items for an unknown reason.

Possible solution paths:

  • Ensure CES is able to access the Coveo Security Service by validating the Sitecore Server URL in the security provider (already done here).
  • Remove the <IndexPermissions> element from the Coveo.SearchProvider.config file to revert to the default value (true) and rebuild the Sitecore indexes.
  • Manually refresh the Coveo index security cache to force CES to expand the Sitecore roles and users again now that the Coveo Security service is accessible.
  • Check the Sitecore logs when rebuilding the Sitecore indexes and refreshing the Coveo index security cache to identify problems with Sitecore security or Coveo for Sitecore.

If the above suggestions do not work, can you click on that "Effective Combined Permissions" dropdown menu and give me all the level and set names along with the permissions in those sets. Something like:

  • [Custom Source Permissions / Set 1]: coveo\admin User Allowed
  • [Administrator Level / Administrator Set]: coveo_sitecoreadministrators Group Allowed
  • [Parent : 3 Role Level / Parent : 3 Role Set]: Anonymous Allowed
  • [Owner Level / Owner Set]: Anonymous Allowed

Thank you,

Jeff

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Nov 10, 2015 4:28 PM

Hi @bberriz, what was the solution to your problem exactly? Was updating the security cache enough to have it working?

Thanks for sharing the details.

Ask a question