You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a fix for the issue are some digging into the source code. The cause of the issue is that the item had been deleted but the item was still in the index. Even after rebuilding the index it remained
A small change to the following file will solve it Sitecore.Services.GraphQL.EdgeSchema.Services.SearchService, Sitecore.Services.GraphQL.EdgeSchema
After this line IEnumerable<Item> source2 = results.Hits.Select<SearchHit<ContentSearchResult>, Item>((Func<SearchHit<ContentSearchResult>, Item>)(searchHit => searchHit.Document.GetItem()));
Filter out null items e.g.
source2 = source2.Where(i => i != null);
I patched in the change and nulls won't be returned in the json
Description
When running
npm run build
we get the following error:I added
console.log(results);
on line 135 of the above file and got:As you can see, we are getting some null values returned. These need to be filtered out to enable the build to complete.
Expected behavior
There should not be null values returned to graphql-sitemap-service.js or the build should complete, ignoring the null values.
Steps To Reproduce
Possible Fix
Your Environment
The text was updated successfully, but these errors were encountered: