Workaround for null issues when indexing #31
Conversation
Issue arises when Examine is indexing grid nodes with DTGE and Nested Content content that are also indexed; Umbraco 7.3. Grid content is being indexed using Skybrud.Umbraco.GridData package with this pull request and this gist. Doc type models are generated using ZpqrtBnk Umbraco Models Builder with a modified using System;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Web;
public class PublishedContentModel : Umbraco.Core.Models.PublishedContent.PublishedContentModel
{
public PublishedContentModel(IPublishedContent content)
: base(content)
{
}
public T GetPropertyValue<T>(string alias)
{
try
{
if (this.Content.HasProperty(alias) && this.Content.HasValue(alias))
{
return PublishedContentExtensions.GetPropertyValue<T>(this.Content, alias);
}
else
{
return default(T);
}
}
catch (Exception exception)
{
LogHelper.Error<IPublishedContent>(
string.Format("Name: {0} - Alias: {1}", this.Content.Name, alias),
exception);
return default(T);
}
}
} |
Thanks @nvisage-gf, we'll review it. |
@@ -9,7 +9,6 @@ | |||
string docType = Model.value.docType.ToString(); | |||
string value = Model.value.value.ToString(); | |||
string viewPath = Model.editor.config.viewPath.ToString(); | |||
string previewViewPath = Model.editor.config.previewViewPath.ToString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nvisage-gf Could you add the previewViewPath
line back in please? Thanks.
@nvisage-gf All looks good, thanks! Although I think you'll need to rebase on the latest commits - I'd just merged in PR #17 - which causes a merge conflict for your PR. |
Issue arises when Examine is indexing grid nodes with DTGE and Nested Content content that are also indexed, avoid null being cached in case of conversion issue; Umbraco 7.3.
done |
Workaround for null issues when indexing
@nvisage-gf Thanks for the PR. 👍 (I forgot to reply the other day) |
No description provided.