While creating a basic test for a client which requires the Profiling and Personalization module to show components based on user visiting certain pages, I stumbled upon a very persistent null reference error trying to retrieve the page which has some tracked components on them.
What I have now:
- A win 2008 R2 server with IIS 7.5 and Tridion 2011 SP1
- A staging environment of our test ASPX/.Net website running Integrated Mode
What I did:
- configured the WAIModule in my web.config based on IIS 7 on said site config as described on the Tridion Live Content
- doublechecked that the cd_wai.jar and cd_wai_config is present
- Added/created categories, keywords, target groups and connected them all much like the guide described here http://megipsy.blogspot.nl/2014/03/sdl-tridion-how-to-enable-profiling-and.html
- doublechecked the source page on the server and got proper conditionals for that specific component
- added the 'activate tracking' TBB's
- tried changing the AppPool to classic mode (which makes the entire site fail to load)
- Looked through https://stackoverflow.com/questions/11674707/tridion-profiling-and-personalization-error-the-user-cannot-be-null-please-mak but couldn't find to help me out further.
What happens nonetheless:
As soon as I add a Component Presentation to a page and publish it, I get the following error:
[NullReferenceException: Object reference not set to an instance of an object.]
Tridion.ContentDelivery.Web.WAI.WAIPage..ctor(String tcmUri, HttpContext httpContext) +291
Tridion.ContentDelivery.Web.UI.TargetGroup.Render(HtmlTextWriter writer) +304
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +248
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +394
As soon as i take the component out again and i republish, i get my site back.
Any Idea what I misconfigured?
EDIT -
This is my typemapping:
<ItemTypes defaultStorageId="sqlserver" cached="false">
<Item typeMapping="Page" storageId="iisFile" cached="true"/>
<Item typeMapping="Binary" storageId="iisFile" cached="true"/>
</ItemTypes>
and this is my conditionals for Target Group:
And this is the actual conditional on the page itself:
<tridion:TargetGroup runat="server" ItemURI="tcm:21-23153-64">
<tridion:Conditions runat="server" Negate="false" Operator="AND">
<tridion:Conditions runat="server" Negate="false" Operator="OR">
<tridion:Conditions runat="server" Negate="false" Operator="AND">
<tridion:Condition runat="server" Type="TrackingKey" Operator=">" Negate="false" Name="Grass" Value="20"/>
</tridion:Conditions>
</tridion:Conditions>
</tridion:Conditions>
<tridion:TargetGroup runat="server" ItemURI="tcm:21-23153-64">
<tridion:Conditions runat="server" Negate="false" Operator="AND">
<tridion:Conditions runat="server" Negate="false" Operator="OR">
<tridion:Conditions runat="server" Negate="false" Operator="AND">
<tridion:Condition runat="server" Type="TrackingKey" Operator=">" Negate="false" Name="Grass" Value="20"/>
</tridion:Conditions>
</tridion:Conditions>
</tridion:Conditions>