diff --git a/src/OrchardCore.Modules/OrchardCore.Seo/Handlers/SeoMetaSettingsHandler.cs b/src/OrchardCore.Modules/OrchardCore.Seo/Handlers/SeoMetaSettingsHandler.cs index 9b4e14741ea..d9f4aed055d 100644 --- a/src/OrchardCore.Modules/OrchardCore.Seo/Handlers/SeoMetaSettingsHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Seo/Handlers/SeoMetaSettingsHandler.cs @@ -105,7 +105,7 @@ public override Task GetContentItemAspectAsync(ContentItemAspectContext context) if (string.IsNullOrEmpty(aspect.OpenGraphSiteName)) { - aspect.OpenGraphSiteName = metaSettings.Content.SocialMetaSettings?.OpenGraphSiteName?.Text.ToString(); + aspect.OpenGraphSiteName = metaSettings.Content.SocialMetaSettings?.OpenGraphSiteName?.Text?.ToString(); if (string.IsNullOrEmpty(aspect.OpenGraphSiteName)) { aspect.OpenGraphSiteName = siteSettings.SiteName; @@ -114,7 +114,7 @@ public override Task GetContentItemAspectAsync(ContentItemAspectContext context) if (string.IsNullOrEmpty(aspect.OpenGraphAppId)) { - aspect.OpenGraphAppId = metaSettings.Content.SocialMetaSettings?.OpenGraphAppId?.Text.ToString(); + aspect.OpenGraphAppId = metaSettings.Content.SocialMetaSettings?.OpenGraphAppId?.Text?.ToString(); } if (string.IsNullOrEmpty(aspect.OpenGraphImage))