Developer forum

Forum » Development » new Template call - NullReferenceException

new Template call - NullReferenceException

Bjarne Rosendal
Reply

We have just upgraded a solution from DW 8.4.1.10 to 8.4.1.23

We are now experiencing a NullReferenceException when calling the Template constructor in a simple fashion like this:

var cartTemplate = new Template("/eCom7/Cartv2/Step/MiniCart.htm");

See stacktrace here: http://screencast.com/t/hGDUheyD92T 

This didn't happen in the previous version. Can anyone explane why the error occurs in the FindDesignsVersion method now?


Replies

 
Bjarne Rosendal
Reply

Is it because I am calling the constructor in a notification subscriber context where the layout property is not available to the pageview object?

I tried with an PageTemplateExtender and did not get the error there.

 

You must be logged in to post in the forum