HappyPorch / uSplit

A/B Testing plugin for Umbraco
The Unlicense
11 stars 7 forks source link

Avoid setting request.PublishedContent in catch statement in ExperimentsPipeline #16

Closed hakon-knowit closed 7 years ago

hakon-knowit commented 7 years ago

When uSplit throws an exception in ExperimentsPipeline it resets the value of request.PublishedContent. Umbraco then sets TemplateModel to null. See property setter in PublishedContentRequest

This causes Umbraco to serve completely empty responses to users on our website.

Proposed solution:

  1. Only set PublishedContent if it is different from original value
  2. Run request.TrySetTemplate after setting property
ondrejpialek commented 7 years ago

Should be fixed. Thanks @hakon-knowit!