2017-03-23 62 views
1

我們擁有2sxc AppBlog模塊,它已運行數月。突然間,我從客戶那裏得知它不起作用。當頁面加載時,錯誤是'Error rendering template'。在日誌中,完全例外是:2sxc博客的錯誤:不包含'LinkToPageNumber'的定義

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'ASP._Page_Portals_0_2sxc_Blog_App__library_cshtml' does not contain a definition for 'LinkToPageNumber' 
at CallSite.Target(Closure , CallSite , Object , Int32) 
at ASP._Page_Portals_0_2sxc_Blog_App__pager_cshtml.Execute() in c:\Webs\TAD\Portals\0\2sxc\Blog App\_pager.cshtml:line 18 
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() 
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) 
at System.Web.WebPages.WebPageBase.<>c__DisplayClass7.<RenderPageCore>b__6(TextWriter writer) 
at System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) 
at System.Web.WebPages.WebPageBase.Write(HelperResult result) 
at ASP._Page_Portals_0_2sxc_Blog_App__1_Main_blog_view_cshtml.Execute() in c:\Webs\TAD\Portals\0\2sxc\Blog App\_1 Main blog view.cshtml:line 23 
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() 
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) 
at ToSic.SexyContent.Engines.RazorEngine.Render(TextWriter writer) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 65 
at ToSic.SexyContent.Engines.RazorEngine.RenderTemplate() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 75 
at ToSic.SexyContent.Engines.EngineBase.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Engines\EngineBase.cs:line 89 
at ToSic.SexyContent.SxcInstance.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 200 

任何想法是什麼?

回答

1

那麼,通過更多的挖掘,我能夠自己解決這個問題。 _pager.cshtml文件中的代碼調用lib.LinkToPageNumber。 lib被引用到另一個.cshtml文件,但LinkToPageNumber是_pager.cshtml文件本身的一種方法。我所要做的只是在LinkToPageNumber的幾個實例前刪除lib.,並且一切都很好。

這個錯誤只有在我們的博客超過1頁時才顯示出來,這就是爲什麼它直到那時才正常工作。

+0

完美謝謝:) – iJungleBoy

+1

它在更新版本的博客BTW中修復。另請注意:請將此問題標記爲已回答。 – iJungleBoy

相關問題