2sic / 2sxc

DNN + 2sxc = #DNNCMS - This tool helps web designers and developers prepare great looking content in DNN (DotNetNuke). It's like mixing DNN with Umbraco and Drupal :)
http://2sxc.org
MIT License
145 stars 40 forks source link

2sxc General Exception Log Errors for Blog App #1260

Closed TwoHeadsBrewing closed 7 years ago

TwoHeadsBrewing commented 7 years ago

I'm submitting a ...


- [x] bug report => search github for a similar issue before submitting 
- [x] DNN parts
- [x] other / unknown

**Current behavior**
I've noticed multiple "General Exception" errors in the event log specifically for the Blog App.  These are appearing for every portal/site for which I have the Blog App installed.  

**Expected behavior**
<!-- Describe what the behavior would be without the bug. -->

**Log Error Details**
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:8de1dc86-1a38-4549-a338-15eeb3417d3d
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:UyKjorrg9h5EZGtvvB9fzQ==
Message:Sequence contains no elements
StackTrace:
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at ASP._Page_Portals_42_2sxc_Blog_App__Post_Details_cshtml.Execute() in c:\inetpub\wwwroot\GOTRCMS\Portals\42\2sxc\Blog App\_Post Details.cshtml:line 6
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at ToSic.SexyContent.Engines.RazorEngine.RenderTemplate() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 76
   at ToSic.SexyContent.Engines.EngineBase.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\Engines\EngineBase.cs:line 85
   at ToSic.SexyContent.SxcInstance.Render() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\SxcInstance.cs:line 208
InnerMessage:
InnerStackTrace:
Source:System.Core
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:
Server Name: WIN-VGD4FFTN042

**Please tell us about your environment:**
<!-- AWS hosted EC2 instance for web server, RDS instance for SQL database server -->

* **2sxc version(s):** 8.4.2 <!-- Check whether this is still an issue in the most recent version -->
* **Browser:** [all]
* **DNN:** [ 8.X.X | 9.X.X ] 
* **Language:** [any/all ]
TwoHeadsBrewing commented 7 years ago

Also, here's the line of code on Line 6 of the _Post Details.cshtml: var post = AsDynamic(Data["Default"]).First();

Perhaps change this to .FirstOrDefault()?

iJungleboy commented 7 years ago

This looks like a bug related to search crawler (the DNN crawler). That's why you see PortalId -1.

So it's either something specific to your installation (it could be in any portal, the -1 prevents us from guessing which one), or if it is a bug, it's probably something we would have to improve on the blog template.

Please check if you can figure out what causes it - in case it's installation specific. If it's still something that is a bug, please post in https://github.com/2sic/app-blog

TwoHeadsBrewing commented 7 years ago

I've completely disabled the search crawler processes within DNN, but I'm still getting this error. I've also noticed that I'm getting a different error on the same module (Blog App). Should I start a new report, or post the details here? Thanks!

iJungleboy commented 7 years ago

Please post it on the blog-app, just to keep topics together.