I am currently upgrading a K12 MVC project to K13 MVC 5.
I have successfully upgraded the CMS solution, and it's loading without error.
However, I am getting the following error when loading the MVC site.
[NullReferenceException: Object reference not set to an instance of an object.]
Kentico.Content.Web.Mvc.Routing.PageUrlPathConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +62
System.Web.Routing.Route.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +105
Castle.Proxies.Invocations.Route_ProcessConstraint_1.InvokeMethodOnTarget() +286
Castle.DynamicProxy.AbstractInvocation.Proceed() +105
Glimpse.Core.Extensibility.ExecutionTimer.Time(Action action) +73
Glimpse.Core.Extensions.AlternateMethodContextExtensions.TryProceedWithTimer(IAlternateMethodContext context, TimerResult& timerResult) +227
Glimpse.Core.Extensibility.AlternateMethod.NewImplementation(IAlternateMethodContext context) +31
Castle.DynamicProxy.AbstractInvocation.Proceed() +451
Castle.Proxies.RouteProxy_1.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +349
System.Web.Routing.Route.ProcessConstraints(HttpContextBase httpContext, RouteValueDictionary values, RouteDirection routeDirection) +234
System.Web.Routing.Route.GetRouteData(HttpContextBase httpContext) +218
Castle.Proxies.Invocations.Route_GetRouteData_1.InvokeMethodOnTarget() +88
Castle.DynamicProxy.AbstractInvocation.Proceed() +105
Glimpse.Core.Extensibility.ExecutionTimer.Time(Action action) +73
Glimpse.Core.Extensions.AlternateMethodContextExtensions.TryProceedWithTimer(IAlternateMethodContext context, TimerResult& timerResult) +227
Glimpse.Core.Extensibility.AlternateMethod.NewImplementation(IAlternateMethodContext context) +31
Castle.DynamicProxy.AbstractInvocation.Proceed() +451
Castle.Proxies.RouteProxy_1.GetRouteData(HttpContextBase httpContext) +235
System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +269
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +67
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +222
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +219
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93
The product does use custom routing, but I am not able to find where to add a breakpoint, as the error occurs before it hits any code.
It's possibly related to DocumentNamePath being removed from CMS_Document in this upgrade, as I think that the custom routing used this field, but I have made changes already for this (although possibly incorrectly). But it's not clear from the error what exactly has gone wrong.