404handler icon indicating copy to clipboard operation
404handler copied to clipboard

404 handler erroring after CMS 11 update

Open cjsanchezBW opened this issue 2 years ago • 3 comments

Hello!

After updating Episerver CMS to version 11.20.14, we are getting this error. Is this something you've seen and fixed before?

Exception information: Exception type: HttpCompileException Exception message: http://server/EPiServer/BVNetwork.404Handler/Views/NotFoundRedirect/Suggestions.ascx(40): error CS1929: 'HtmlHelper<RedirectIndexViewData>' does not contain a definition for 'Translate' and the best extension method overload 'CultureInfoExtensions.Translate(CultureInfo, LocalizationService)' requires a receiver of type 'CultureInfo' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType(String virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) at System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName, Object model) at ASP.episerver_bvnetwork_404handler_views_notfoundredirect_index_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in http://server/EPiServer/BVNetwork.404Handler/Views/NotFoundRedirect/Index.ascx:line 5 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.Mvc.ViewPage.ProcessRequest(HttpContext context) at System.Web.Mvc.ViewUserControl.ViewUserControlContainerPage.ProcessRequest(HttpContext context) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4_0.<ProcessRequest>b__0() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass5_0.<Wrap>b__0() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap(Action action) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)

Best,

Cristian Sanchez.

cjsanchezBW avatar Sep 08 '23 16:09 cjsanchezBW

Did you ever solve this? Doesn't seems to be a fixed version available?

nma76 avatar Oct 09 '24 12:10 nma76

I did resolve it, I dont have the code handy right now, but from what I remember, I went into the nuget package zip file which contains the template files that throw this error and I changed something there. So for example, in this case you would have to modify the file http://server/EPiServer/BVNetwork.404Handler/Views/NotFoundRedirect/Suggestions.ascx(40)

It seems there's a problem with the translation, and so I may have removed the translation and placed the string directly, because I did not need to translate for that particular feature in that particular website.

Hope this helps.

cjsanchezBW avatar Oct 09 '24 13:10 cjsanchezBW

@nma76 See my comment above.

cjsanchezBW avatar Oct 09 '24 13:10 cjsanchezBW