There was an error while rendering the template

Aug 25, 2015 at 3:36 AM
This is my first time using 2sxc Content for DNN and I am having a a bit of an issue. I purchased a theme with some templates included for a nice photo grid but unfortunately the seller is being of little help. This is the error that I am getting:
There was an error while rendering the template: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference at CallSite.Target(Closure , CallSite , Object ) at ASP._Page_Portals_21_2sxc_Content_Moose__ProjectsGrid_Listing_cshtml.Execute() in c:\inetpub\vhosts\mcaeducare.com\httpdocs\Portals\21\2sxc\Content\Moose_ProjectsGrid_Listing.cshtml:line 33 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) at ToSic.SexyContent.Engines.RazorEngine.RenderTemplate() at ToSic.SexyContent.Engines.EngineBase.Render() at ToSic.SexyContent.SexyViewContentOrApp.ProcessView(PlaceHolder phOutput, Panel pnlError, Panel pnlMessage)

I am not sure if I will explain this correctly, but I have a couple of rows of data which contain photos. The seller was originally telling me that I was missing some data in one of the text boxes - I however had all text boxes filled in.

Line 33 of code is this:
@if (ListPresentation.Intro.Length > 1)

Would anyone happen to know what my issue is or what I can look at next?

Much appreciated.
Aug 25, 2015 at 6:26 AM
If you go to 'Edit List' in your module, then click 'Edit List Values' is there anything in there that you need to do or complete? There's usually some listcontent settings but also configurable a for listpresentstion.
Marked as answer by dbluma on 8/25/2015 at 3:47 PM
Coordinator
Aug 25, 2015 at 2:09 PM
I'm guessing you're still stuck with something very basic.

the ListPresentation object contains instructions which usually tell the list how to be designed. Usually Presentation-objects have a default (because you often don't want to override anything, just use the default). This is all configured in the template/view-settings.

I'm guessing you either tried setting custom values - and forgot something - or manually deleted the default-content-item (or took it out of the configuration) - so that now it's missing.
Aug 25, 2015 at 10:49 PM
jlscott wrote:
If you go to 'Edit List' in your module, then click 'Edit List Values' is there anything in there that you need to do or complete? There's usually some listcontent settings but also configurable a for listpresentstion.
Thank you very much jlscott! This was it. Before you mentioned it, I had never even noticed the Edit List Values link above. It showed an empty textbox named title. For now, I just entered test into the box and wholla, the page loaded as designed!

Thank you and thanks to 2sicDev both for the quick replies. Much appreciated!