Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Josef Henryson 24 posts 98 karma points
    Jun 27, 2023 @ 12:38
    Josef Henryson
    0

    Null ref exception in SEO Checker 11.0.4

    I am running Umbraco 11.4.0 after a recent upgrade from 7 and have upgraded to the latest SEO Checker as well. Now I get a null ref exception in my prod site when trying to display Umbraco Forms (11.2.0)

    This is my stacktrace:

    NullReferenceException: Object reference not set to an instance of an object.
        SEOChecker.Common.Helpers.ConfigurationHelper.GetValidationMode(string validationMode)
        SEOChecker.Common.PropertyEditors.PrevValueEditors.SEOCheckerPropertyConfiguration.Map(object source)
        SEOChecker.Common.Helpers.UmbracoDocumentHelper.GetDataTypeConfiguration<T>(int datatypeNodeId)
        SEOChecker.Common.Helpers.UmbracoDocumentHelper.GetSEOCheckerDataTypeConfig(string doctype)
        SEOChecker.Common.Model.Meta.RawMetaData.get_SEOCheckerDataTypeConfig()
        SEOChecker.Common.Model.Meta.RawMetaData.Initialize(string culture, string segment)
        SEOChecker.Common.Model.Meta.RawMetaData.GetMetaData(IUmbracoDocument document, string culture, string segment)
        SEOChecker.Common.Model.Meta.RawMetaData.GetMetaData(Guid id, string culture, string segment, bool preview)
        SEOChecker.Library.PropertyEditorConverters.SEOCheckerMetadataConverter.ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)
        Umbraco.Cms.Core.Models.PublishedContent.PublishedPropertyType.ConvertSourceToInter(IPublishedElement owner, object source, bool preview)
        Umbraco.Cms.Infrastructure.PublishedCache.Property.GetInterValue(string culture, string segment)
        Umbraco.Cms.Infrastructure.PublishedCache.Property.GetValue(string culture, string segment)
        Umbraco.Extensions.PublishedPropertyExtension.Value(IPublishedProperty property, IPublishedValueFallback publishedValueFallback, string culture, string segment, Fallback fallback, object defaultValue)
        Umbraco.Forms.Core.Services.PublishedContentPageService.GetPageElements(IPublishedContent content)
        Umbraco.Forms.Core.Services.PublishedContentPageService.GetPageElements()
        Umbraco.Forms.Web.Services.FormRenderingService.PopulatePageElements(HttpContext httpContext)
        Umbraco.Forms.Web.Services.FormRenderingService.GetFormModelAsync(HttpContext httpContext, Guid formId, Nullable<Guid> recordId, string theme)
        Umbraco.Forms.Web.ViewComponents.RenderFormViewComponent.InvokeAsync(Guid formId, Nullable<Guid> recordId, string theme, bool includeScripts)
        Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsyncCore(ObjectMethodExecutor executor, object component, ViewComponentContext context)
        Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
        Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
        Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, object arguments)
        AspNetCore.Views_MacroPartials_InsertUmbracoFormWithTheme.ExecuteAsync() in InsertUmbracoFormWithTheme.cshtml
        +
            @(await Component.InvokeAsync("RenderForm",new { formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts }))
    

    I also get an exception when trying to open the SEO top menu in backoffice.

    System.NullReferenceException, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Object reference not set to an instance of an object.
            at SEOChecker.Common.Trees.SEOCheckerTreeController.GetMenuForNode(String id, FormCollection queryStrings)
           at Umbraco.Cms.Web.BackOffice.Trees.TreeControllerBase.GetMenuForNodeAsync(String id, FormCollection queryStrings)
           at Umbraco.Cms.Web.BackOffice.Trees.TreeControllerBase.GetMenu(String id, FormCollection queryStrings)
           at lambda_method24535(Closure, Object)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
        --- End of stack trace from previous location ---
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    

    Any ideas? Thanks, Josef

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Jun 27, 2023 @ 12:41
    Richard Soeteman
    100

    Hi,

    Try saving the datatype config of the seochecker daattype.

    Best,

    Richard

  • Josef Henryson 24 posts 98 karma points
    Jun 27, 2023 @ 12:43
    Josef Henryson
    0

    Thank you for your very quick response!

    How do I do that?

  • Josef Henryson 24 posts 98 karma points
    Jun 27, 2023 @ 13:03
    Josef Henryson
    0

    Awesome!

    It works like a charm now!

    Still get the exception in the tree menu but that is less panic right now.

    Thank you so much!

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Jun 27, 2023 @ 12:45
    Richard Soeteman
    1

    On the datatype Save the settings?

  • Josef Henryson 24 posts 98 karma points
    Jun 27, 2023 @ 12:53
    Josef Henryson
    0

    Thanks, I think I managed to find it. In my stage env the forms seem to work now! But the menu exception seems to still exist (less important to us right now though). I will check to see if this helps even in prod.

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Jun 27, 2023 @ 13:21
    Richard Soeteman
    0

    Could be that other config is missing as well. Upgrade from .Net Framework to .Net core was a god point for some other refactoring. Check log files maybe?

  • Josef Henryson 24 posts 98 karma points
    Jun 27, 2023 @ 14:39
    Josef Henryson
    0

    I can see very many of these in the logs. Do you think it may be related?

    {"@t":"2023-06-27T13:52:37.2179931Z","@mt":"Exception ({InstanceId}).","@l":"Error","@x":"Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.\r\nThe statement has been terminated.\r\n   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\r\n   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()\r\n   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)\r\n   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)\r\n   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)\r\n   at Microsoft.Data.SqlClient.SqlCommand.ExecuteScalar()\r\n   at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)\r\n   at NPoco.Database.ExecuteScalarHelper(DbCommand cmd)\r\n   at NPoco.Database.InsertAsyncImp[T](PocoData pocoData, String tableName, String primaryKeyName, Boolean autoIncrement, T poco, Boolean sync)\r\nClientConnectionId:404b932e-2efb-4736-bb3c-5aefc2605fa7\r\nError Number:8152,State:30,Class:16","InstanceId":"84b25ba5","SourceContext":"Umbraco.Cms.Infrastructure.Persistence.UmbracoDatabase","ActionId":"313160c9-5868-41dc-b18b-6324fdec3c4d","ActionName":"SEOChecker.Web.Controllers.Validation.SEOCheckerScheduleApiController.Run (SEOChecker.Web)","RequestId":"80002dc4-0000-d500-b63f-84710c7967bb","RequestPath":"/umbraco/seochecker/seocheckerscheduleapi/run","ProcessId":6148,"ProcessName":"w3wp","ThreadId":81,"ApplicationId":"bea7862e64c1cace2fd0b62a545e14c094475843","MachineName":"XXX","Log4NetLevel":"ERROR","HttpRequestId":"6d471577-9dbc-402c-a434-ecb776e0c86f","HttpRequestNumber":439,"HttpSessionId":"d077bb59-41eb-c827-a32c-992fa6e67510"}
        {"@t":"2023-06-27T13:52:37.2200394Z","@mt":"Error validating document '10849'","@l":"Error","SourceContext":"SEOChecker.Common.Repository.Queue.AnalyserQueueRepository","ActionId":"313160c9-5868-41dc-b18b-6324fdec3c4d","ActionName":"SEOChecker.Web.Controllers.Validation.SEOCheckerScheduleApiController.Run (SEOChecker.Web)","RequestId":"80002dc4-0000-d500-b63f-84710c7967bb","RequestPath":"/umbraco/seochecker/seocheckerscheduleapi/run","ProcessId":6148,"ProcessName":"w3wp","ThreadId":81,"ApplicationId":"bea7862e64c1cace2fd0b62a545e14c094475843","MachineName":"XXX","Log4NetLevel":"ERROR","HttpRequestId":"6d471577-9dbc-402c-a434-ecb776e0c86f","HttpRequestNumber":439,"HttpSessionId":"d077bb59-41eb-c827-a32c-992fa6e67510"}
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies