Try our conversational search powered by Generative AI!

Issues after installing patch 4

Vote:
 

After installing path 4 on a site, I got the following issue. If a page has page name that contains space (i.e. PageName = "About us", UrlSegment = "About-us") the page fails with the following error:

ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
System.ArgumentNullException: Value cannot be null.
Parameter name: stringToEscape
at System.Uri.EscapeUriString(String stringToEscape)
at EPiServer.Web.Routing.ContentRoute.AddQueryParameter(StringBuilder virtualPath, RouteValueDictionary values, String name, Boolean first)
at EPiServer.Web.Routing.ContentRoute.SetQueryParameters(StringBuilder virtualPath, RouteValueDictionary values, HashSet`1 usedValues)
at EPiServer.Web.Routing.ContentRoute.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
at System.Web.Routing.RouteCollection.GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
at System.Web.Mvc.RouteCollectionExtensions.GetVirtualPathForArea(RouteCollection routes, RequestContext requestContext, String name, RouteValueDictionary values, Boolean& usingAreas)
at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter)
at System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues)
at ASP._Page_Views_Shared_Layouts__Layout_cshtml.Execute() in c:\Projects\...\Views\Shared\Layouts\_Layout.cshtml:line 43
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.WebPages.WebPageBase.Write(HelperResult result)
at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body)
at System.Web.WebPages.WebPageBase.PopContext()
at System.Web.WebPages.WebPageBase.Write(HelperResult result)
at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body)
at System.Web.WebPages.WebPageBase.PopContext()
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

#75550
Sep 28, 2013 10:39
Vote:
 

Hi,

I have tried to repro this using AlloyMVC.

I first installed Alloy MVC on an empty EPiServer 7 site.

Upgrade the site to Patch 3.

Tried to browse the "About us" page. -> no issues.

Upgraded the site to Patch 4.

Again, tried to browse the "About us" page -> still no issues.

I have also tried creating new pages without being able to replicate the issue.

#75618
Oct 01, 2013 12:59
Vote:
 

Update: Managed to reproduce this in another project. The following statement fails:

@Url.Action("GetDeliveryExpressAddressForm", ViewContext.RouteData.Values)

    

Have you changed the routing logic in patch 4?

#77179
Edited, Nov 12, 2013 15:20
Vote:
 

If I look at ViewContext.RouteData.Values it consists of 4 Keys: 

[0] "language" string
[1] "action" string
[2] "controller" string
[3] "currentContent" string

and have the following Values:

 [0] "no" object {string}
 [1] "index" object {string}
 [2] "Checkout" object {string}
 [3] null object

    
Could it be that the AddQueryParameter fails if route data value is null?

#77183
Nov 12, 2013 15:38
Vote:
 

You are right this is probably caused by the value of currentContent being null. From the information we have we cannot really figure out if the problem is that we (or rather the episerver route implementation) are handling a route that we should have left for the default MVC route handling or, if we for some unknown reason just fail to set currentContent. In your scenario, does currentContent make sense at all?

#77190
Nov 12, 2013 16:48
Vote:
 

I would assume currentContent corresponds to current IContent? currentContent should make sense as this is a page based on an EPiServer page type. If we change the code from 

@Url.Action("GetDeliveryExpressAddressForm", ViewContext.RouteData.Values)

to

@Url.Action("GetDeliveryExpressAddressForm", "Checkout", new {language=ViewContext.RouteData.Values["language"]})

    

the problem goes away.

#77192
Nov 12, 2013 17:03
Vote:
 

I have an issue that might be related to this:

http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=77996&epslanguage=en

At least it is also related to routing and Patch 4.  I was wondering if it could be the effect from fixing bug

http://world.episerver.com/Support/Bug-list-beta/bug/98769/

Seems that I am not able to register any route that would be handled by default MVC handling (controller/action etc).

 

#78037
Dec 02, 2013 12:15
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.