U4-8066 - With the same xslt macro, some pages can be rendered, other pages can't!!!

Created by esunxray 23 Feb 2016, 14:28:41 Updated by Paul Bowen 16 Aug 2016, 04:52:46

For example following can be rendered rightly: http://localhost/%E6%96%B0%E9%97%BB%E5%8A%A8%E6%80%81/ can be rendered. the url can't be rendered:http://localhost/%E8%B5%B0%E8%BF%9B%E5%85%B1%E9%9D%92/%E9%A2%86%E5%AF%BC%E5%85%B3%E6%80%80/%E4%B8%AD%E5%85%B1%E4%B8%AD%E5%A4%AE%E6%94%BF%E6%B2%BB%E5%B1%80%E5%B8%B8%E5%A7%94-%E5%85%A8%E5%9B%BD%E4%BA%BA%E5%A4%A7%E5%B8%B8%E5%A7%94%E4%BC%9A%E5%A7%94%E5%91%98%E9%95%BF%E4%B9%94%E7%9F%B3%E8%A7%86%E5%AF%9F%E5%85%B1%E9%9D%92%E5%9F%8E/

the above string is Chinese text as: http://localhost/走进共青/领导关怀/中共中央政治局常委-全国人大常委会委员长乔石视察共青城/

It's mean that Umbraco 7 can't show most of Chinese pages just because those pages' name is in Chinese!!!. The same xslt macro can run rightly on my Umbraco 6 site with WebForms template. In Umbraco 7, I use Mvc template, so I think this may be the bug about mvc.

I think this is a bug.

Server Error in '/' Application.

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Source Error:

Line 14: Line 15: @section menu{ Line 16: @Umbraco.RenderMacro("SuntemMenu") Line 17: } Line 18:

Source File: h:\localUser\Sun\Sites\Umbraco\Views\suntemPage.cshtml Line: 16

Stack Trace:

[PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.] System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) +14067425 System.IO.Path.GetFullPathInternal(String path) +58 System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +143 System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) +305 System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +122 System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +92 System.Web.InternalSecurityPermissions.PathDiscovery(String path) +43 System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +175 System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +62 System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +36 Umbraco.Web.UmbracoComponentRenderer.RenderMacro(macro m, IDictionary2 parameters, page umbracoPage) +840 ASP._Page_Views_suntemPage_cshtml.<Execute>b__1() in h:\localUser\Sun\Sites\Umbraco\Views\suntemPage.cshtml:16 System.Web.WebPages.<>c__DisplayClass7.<RenderSection>b__5(TextWriter tw) +412 System.Web.WebPages.WebPageBase.Write(HelperResult result) +108 ASP._Page_Views_Suntem_cshtml.Execute() in h:\localUser\Sun\Sites\Umbraco\Views\Suntem.cshtml:41 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122 System.Web.WebPages.<>c__DisplayClass3.<RenderPageCore>b__2(TextWriter writer) +311 System.Web.WebPages.WebPageBase.Write(HelperResult result) +108 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +89 System.Web.WebPages.WebPageBase.PopContext() +310 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +232 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +81 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +186 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38 System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +65 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +36 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0

Comments

Paul Bowen 16 Aug 2016, 04:52:46

I've been having a lot of issues today with regards to new multi-lingual site I'm working on. It's in fact an upgrade of an existing live site and has a lot of Chinese and Japanese content that works perfectly on the current site which is Umbraco 4.7.11.

However when trying to open up those pages on Umbraco 7.4.3 I'm getting PathTooLongException errors all over the place. Reducing the length of the URL was turning into a real problem because they didn't actually have to be that long to cause an issue.

However, I managed to find a solution. My pages now work with the following in the web.config.

<httpRuntime maxUrlLength="1000" relaxedUrlToFileSystemMapping="true" />

Hope this helps you.


Priority: Critical

Type: Bug

State: Submitted

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.1

Due in version:

Sprint:

Story Points:

Cycle: