You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which Umbraco.Community.BlockPreview version are you using?
1.10.5
Which Umbraco version are you using? For example: 10.4.0 - don't just write v10
13.5.2
Bug summary
Our templates use pascal case for template filenames (e.g. "VideoBlock.cshtml") which works well when Umbraco is hosted on Windows, however on Linux we've see an issue with finding the template likely due to trying to find the template using the alias without pascal casing. Looking at the code within this repository I can see the two different cases ("videoBlock.cshtml" & "VideoBlock.cshtml") are being checked, however I think the problem is instead of IRazorViewEngine returning a ViewEngineResult with Success as false, an exception is being thrown, stack trace shown below.
System.IO.FileNotFoundException: Could not find file '/Release/Views/Partials/blockgrid/Components/videoBlock.cshtml'.
File name: '/Release/Views/Partials/blockgrid/Components/videoBlock.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, Boolean failForSymlink, Boolean& wasSymlink, 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 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.LocatePageFromPath(String executingFilePath, String pagePath, Boolean isMainPage)
at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
at Umbraco.Community.BlockPreview.Services.BlockPreviewService.GetViewResult(String contentAlias, BlockType blockType)
at Umbraco.Community.BlockPreview.Services.BlockPreviewService.GetMarkupFromPartial(ControllerContext controllerContext, ViewDataDictionary viewData, String contentAlias, BlockType blockType)
at Umbraco.Community.BlockPreview.Services.BlockPreviewService.GetMarkup(ControllerContext controllerContext, String contentAlias, ViewDataDictionary viewData, BlockType blockType)
at Umbraco.Community.BlockPreview.Services.BlockPreviewService.RenderGridBlock(BlockValue blockData, ControllerContext controllerContext, String blockEditorAlias, Guid documentTypeUnique, String contentUdi, String settingsUdi)
at Umbraco.Community.BlockPreview.Controllers.BlockPreviewApiController.PreviewGridBlock(BlockValue blockData, Guid nodeKey, String blockEditorAlias, String contentElementAlias, String culture, Guid documentTypeKey, String contentUdi, String settingsUdi)
Steps to reproduce
Change view template filenames to use pascal casing
View block grid editor within Backoffice within a Linux environment
See error suggesting the view template can't be found
Expected result / actual result
Block grid editor would find the template and render a preview.
The text was updated successfully, but these errors were encountered:
Which Umbraco.Community.BlockPreview version are you using?
1.10.5
Which Umbraco version are you using? For example: 10.4.0 - don't just write v10
13.5.2
Bug summary
Our templates use pascal case for template filenames (e.g. "VideoBlock.cshtml") which works well when Umbraco is hosted on Windows, however on Linux we've see an issue with finding the template likely due to trying to find the template using the alias without pascal casing. Looking at the code within this repository I can see the two different cases ("videoBlock.cshtml" & "VideoBlock.cshtml") are being checked, however I think the problem is instead of
IRazorViewEngine
returning aViewEngineResult
withSuccess
as false, an exception is being thrown, stack trace shown below.Steps to reproduce
Expected result / actual result
Block grid editor would find the template and render a preview.
The text was updated successfully, but these errors were encountered: