Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux casesensetive view-paths #24

Merged

Conversation

madsoulswe
Copy link
Contributor

@madsoulswe madsoulswe commented Aug 17, 2023

Issue:
View-lookup is casesensetive on Linux and "ToFirstUpper()" prevents using aliases in camelCase.

Idea:
Umbraco defaults doctype-aliases to camelCase so I think the best would be to leave the alias as it is 🙂

Exception when using Linux.

System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/www/....../Views/Partials/blockgrid/Components/MapModule.cshtml'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFileInfo.CreateReadStream()
   at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.FileProviderRazorProjectItem.Read()
   at Microsoft.AspNetCore.Razor.Language.RazorSourceDocument.ReadFrom(RazorProjectItem projectItem)
   at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.CreateCodeDocumentCore(RazorProjectItem projectItem, Action`1 configureParser, Action`1 configureCodeGeneration)
   at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.CreateCodeDocumentCore(RazorProjectItem projectItem)
   at Microsoft.AspNetCore.Razor.Language.RazorProjectEngine.Process(RazorProjectItem projectItem)
   at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompiler.CompileAndEmit(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompiler.OnCacheMiss(String normalizedPath)
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.OnCacheMiss(ViewLocationExpanderContext expanderContext, ViewLocationCacheKey cacheKey)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromViewLocations(ActionContext actionContext, String pageName, Boolean isMainPage)
   at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.FindView(ActionContext context, String viewName, Boolean isMainPage)
   at Umbraco.Community.BlockPreview.Services.BackOfficePreviewService.GetMarkupFromPartial(ControllerContext controllerContext, ViewDataDictionary viewData, String contentAlias)
   at Umbraco.Community.BlockPreview.Services.BackOfficeGridPreviewService.GetMarkupForBlock(BlockValue blockValue, ControllerContext controllerContext, String culture)
   at Umbraco.Community.BlockPreview.Controllers.BlockPreviewApiController.PreviewMarkup(BlockValue data, Int32 pageId, Boolean isGrid, String culture)

@rickbutterfield
Copy link
Owner

@madsoulswe Perfect, thank you for the contribution! #h5yr

@rickbutterfield rickbutterfield merged commit bc83aec into rickbutterfield:develop Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants