Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted redirects cause exceptions when rebuilding reporting db or aggregating interactions #34

Open
derekcorreia opened this issue Jun 6, 2017 · 1 comment

Comments

@derekcorreia
Copy link

derekcorreia commented Jun 6, 2017

I'm working with a customer using version 1.8.1.3 of the module. They are unable to rebuild their reporting database because the interactions contain activity with redirects that have been deleted. Instead, they receive this exception:

6708 2017:06:06 11:03:51 ERROR Aggregation Error
Exception: System.Exception
Message: Object reference not set to an instance of an object.
Source: Sitecore.ExperienceAnalytics
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.ProcessSegments(AggregationPipelineArgs args, IEnumerable`1 segments)
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.OnProcess(AggregationPipelineArgs args)
   at Sitecore.Analytics.Aggregation.Pipeline.AggregationProcessor.Process(AggregationPipelineArgs args)

Nested Exception

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Hi.UrlRewrite
   at Hi.UrlRewrite.Analytics.ByUrlRewriteRedirect.<ExtractDimensionKeys>d__2.MoveNext() in C:\git\UrlRewrite\Hi.UrlRewrite\Analytics\ByUrlRewriteRedirect.cs:line 27
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Sitecore.ExperienceAnalytics.Aggregation.Dimensions.PageEventDimensionBase.GetDimensionKeys(IVisitAggregationContext context)
   at Sitecore.ExperienceAnalytics.Aggregation.Dimensions.PageEventDimensionBase.<GetData>d__8.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Sitecore.ExperienceAnalytics.Aggregation.Pipeline.SegmentProcessor.ProcessSegments(AggregationPipelineArgs args, IEnumerable`1 segments)

Steps to reproduce:
install fresh 8.1u3 instance
install url rewrite 1.8.1.3
deploy marketing definitions
smart publish site

in incognito window:

  • Browse to site homepage
  • browse to /external1 (redirected to sitecore.net)
  • browse to site homepage
  • browse to page to end tracking/abandon session

validate interaction logged to analytic db via robomongo
Open content editor
delete simple external redirect item
smart publish site

attach secondary reporting database
create new connection string for reporting.secondary
rebuild reporting database (/sitecore/admin/rebuildreportingdb.aspx)

Expected Behavior
Application does not process redirects for items now missing

Actual Behavior
Sitecore halts processing interactions, cannot rebuild analytics db.

We were able to work around this problem by checking for a null item when grabbing the pageEvent from Sitecore. I will submit a pull request shortly with the code we are using to work around the issue; I'm not sure this is how you would want to handle reporting or not, but it allowed us to get Experience Analytics working again.

@derekcorreia
Copy link
Author

#35 has been submitted. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant