diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..334e91d --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,10 @@ +mode: ContinuousDeployment +branches: + master: + regex: ^master$|^main$ + xm: + regex: ^fork/xm$ + mode: ContinuousDeployment + increment: None + tag: "xm" + source-branches: [] \ No newline at end of file diff --git a/src/Unic.ErrorManager.Core/Controls/BaseError.cs b/src/Unic.ErrorManager.Core/Controls/BaseError.cs index 30db402..30aea00 100644 --- a/src/Unic.ErrorManager.Core/Controls/BaseError.cs +++ b/src/Unic.ErrorManager.Core/Controls/BaseError.cs @@ -20,8 +20,6 @@ namespace Unic.ErrorManager.Core.Controls using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Text; - - using Sitecore.Analytics; using Sitecore.Configuration; using Sitecore.Data.Items; using Sitecore.Data.Managers; @@ -155,9 +153,6 @@ protected override void OnLoad(EventArgs e) url.Append(url.ToString().IndexOf("?") == -1 ? "?" : "&"); url.Append("rawUrl=" + this.Server.UrlEncode(WebUtil.GetRawUrl())); - // add the tracking disable parameter - url.Append(string.Format("&{0}={1}", Definitions.Constants.DisableTrackingParameterName, Settings.GetSetting(Definitions.Constants.DisableTrackingParameterValueSetting, string.Empty))); - // change display mode to normal url.Append(string.Format("&{0}={1}", Definitions.Constants.DisplayModeParameterName, Definitions.Constants.DisplayModeParameterValueSetting)); } @@ -243,16 +238,6 @@ protected override void OnLoad(EventArgs e) { string body = new StreamReader(response.GetResponseStream()).ReadToEnd(); - // Insert image with request to the static page if Analytics is enabled. - // This is a hotfix for a Sitecore bug, see Sitecore issue #378950 - if (Settings.GetBoolSetting("Xdb.Enabled", false) && site.Tracking().EnableTracking) - { - body = body.Replace("", - string.Format("", - Settings.GetSetting(this.SettingsKey + ".Static"), - base.Request.QueryString)); - } - this.Response.Write(body); } else diff --git a/src/Unic.ErrorManager.Core/Definitions/Constants.cs b/src/Unic.ErrorManager.Core/Definitions/Constants.cs index 8719d43..81d4cd3 100644 --- a/src/Unic.ErrorManager.Core/Definitions/Constants.cs +++ b/src/Unic.ErrorManager.Core/Definitions/Constants.cs @@ -2,12 +2,6 @@ { public static class Constants { - public static string DisableTrackingParameterName = "em_dt"; - - public static string DisableTrackingParameterValueSetting = "ErrorManager.DisableTrackingParameterValue"; - - public static string DisableTrackingSetting = "ErrorManager.DisableTracking"; - public static string DisplayModeParameterName = "sc_mode"; public static string DisplayModeParameterValueSetting = "normal"; diff --git a/src/Unic.ErrorManager.Core/Pipelines/HttpRequest/CheckErrorManagerUserAgent.cs b/src/Unic.ErrorManager.Core/Pipelines/HttpRequest/CheckErrorManagerUserAgent.cs deleted file mode 100644 index e04290a..0000000 --- a/src/Unic.ErrorManager.Core/Pipelines/HttpRequest/CheckErrorManagerUserAgent.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace Unic.ErrorManager.Core.Pipelines.HttpRequest -{ - using System; - using System.Web; - using Sitecore; - using Sitecore.Analytics.Pipelines.ExcludeRobots; - using Sitecore.Configuration; - using Sitecore.Diagnostics; - using Constants = Definitions.Constants; - - [UsedImplicitly] - public class CheckErrorManagerUserAgent : ExcludeRobotsProcessor - { - public override void Process(ExcludeRobotsArgs args) - { - Assert.ArgumentNotNull(args, nameof(args)); - - if (!this.ShouldExecute()) return; - - var context = this.GetHttpContext(); - var request = context?.Request; - args.IsInExcludeList = this.CheckUserAgent(request); - } - - protected virtual bool ShouldExecute() - { - return Settings.GetBoolSetting(Constants.EnableAgentHeaderCheckSetting, true); - } - - protected virtual bool CheckUserAgent(HttpRequestBase request) - { - var userAgent = request?.UserAgent; - if (userAgent == null) return false; - - var userAgentSetting = Settings.GetSetting(Constants.UserAgentSetting); - return string.Equals(userAgent, userAgentSetting, StringComparison.InvariantCultureIgnoreCase); - } - - protected virtual HttpContextWrapper GetHttpContext() - { - return new HttpContextWrapper(HttpContext.Current); - } - } -} \ No newline at end of file diff --git a/src/Unic.ErrorManager.Core/Pipelines/StartAnalytics/DisableRequestTracking.cs b/src/Unic.ErrorManager.Core/Pipelines/StartAnalytics/DisableRequestTracking.cs deleted file mode 100644 index e3c25ec..0000000 --- a/src/Unic.ErrorManager.Core/Pipelines/StartAnalytics/DisableRequestTracking.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace Unic.ErrorManager.Core.Pipelines.StartAnalytics -{ - using System; - using Sitecore.Configuration; - using Sitecore.Diagnostics; - using Sitecore.Pipelines; - using Sitecore.Web; - using Definitions; - - /// - /// Disables the xDB tracker for requests from the error manager to the error pages due to session locks - /// - public class DisableRequestTracking - { - public virtual void Process(PipelineArgs args) - { - Assert.ArgumentNotNull(args, nameof(args)); - - if (!this.ShouldExecute()) return; - - if (this.ShouldDisableTracking()) - { - args.AbortPipeline(); - } - } - - protected virtual bool ShouldExecute() - { - return Settings.GetBoolSetting(Constants.DisableTrackingSetting, true); - } - - protected virtual bool ShouldDisableTracking() - { - var disableTrackingParameterValueQuery = WebUtil.GetQueryString(Constants.DisableTrackingParameterName); - if (string.IsNullOrWhiteSpace(disableTrackingParameterValueQuery)) return false; - - var disableTrackingParameterValue = Settings.GetSetting(Constants.DisableTrackingParameterValueSetting); - return string.Equals(disableTrackingParameterValueQuery, disableTrackingParameterValue, StringComparison.InvariantCultureIgnoreCase); - } - } -} diff --git a/src/Unic.ErrorManager.Core/Unic.ErrorManager.Core.csproj b/src/Unic.ErrorManager.Core/Unic.ErrorManager.Core.csproj index 558dcaa..e88bd7c 100644 --- a/src/Unic.ErrorManager.Core/Unic.ErrorManager.Core.csproj +++ b/src/Unic.ErrorManager.Core/Unic.ErrorManager.Core.csproj @@ -47,10 +47,6 @@ ..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.5\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll True - - ..\..\packages\Sitecore.Analytics.NoReferences.8.1.151207\lib\NET45\Sitecore.Analytics.dll - True - ..\..\packages\Sitecore.Kernel.NoReferences.8.1.151207\lib\NET45\Sitecore.Kernel.dll True @@ -65,9 +61,7 @@ - - diff --git a/src/Unic.ErrorManager.Core/packages.config b/src/Unic.ErrorManager.Core/packages.config index 1d1f777..1027384 100644 --- a/src/Unic.ErrorManager.Core/packages.config +++ b/src/Unic.ErrorManager.Core/packages.config @@ -2,6 +2,5 @@ - \ No newline at end of file diff --git a/src/Unic.ErrorManager.Website/App_Config/Include/01_modules/Unic.ErrorManager.config b/src/Unic.ErrorManager.Website/App_Config/Include/01_modules/Unic.ErrorManager.config index cb34153..6bf0ea4 100644 --- a/src/Unic.ErrorManager.Website/App_Config/Include/01_modules/Unic.ErrorManager.config +++ b/src/Unic.ErrorManager.Website/App_Config/Include/01_modules/Unic.ErrorManager.config @@ -72,13 +72,6 @@ --> - - - - @@ -135,28 +128,6 @@ - - - - - - - - - - - diff --git a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/noaccess.aspx b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/noaccess.aspx index 1c33741..d75d7ad 100644 --- a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/noaccess.aspx +++ b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/noaccess.aspx @@ -1,6 +1,5 @@ <%@ OutputCache Location="None" VaryByParam="none" %> <%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.HtmlControls" Assembly="Sitecore.Kernel" %> -<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Analytics" %> <%@ Page language="c#" Codebehind="noaccess.aspx.cs" EnableViewState="false" EnableViewStateMac="false" AutoEventWireup="True" Inherits="SitecoreClient.Page.NoAccess" %> <% Response.StatusCode = 200; %> @@ -71,6 +70,5 @@ - diff --git a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolayout.aspx b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolayout.aspx index 18a15e7..fadec86 100644 --- a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolayout.aspx +++ b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolayout.aspx @@ -1,6 +1,5 @@ <%@ OutputCache Location="None" VaryByParam="none" %> <%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.HtmlControls" Assembly="Sitecore.Kernel" %> -<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Analytics" %> <%@ Page language="c#" Codebehind="nolayout.aspx.cs" EnableViewState="false" EnableViewStateMac="false" AutoEventWireup="True" Inherits="SitecoreClient.Page.NoLayout" %> <% Response.StatusCode = 200; %> @@ -75,6 +74,5 @@ - diff --git a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolicense.aspx b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolicense.aspx index b749191..db5867e 100644 --- a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolicense.aspx +++ b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/nolicense.aspx @@ -1,6 +1,5 @@ <%@ OutputCache Location="None" VaryByParam="none" %> <%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.HtmlControls" Assembly="Sitecore.Kernel" %> -<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Analytics" %> <%@ Page language="c#" Codebehind="nolicense.aspx.cs" EnableViewState="false" EnableViewStateMac="false" AutoEventWireup="True" Inherits="SitecoreClient.Page.NoLicense" %> <% Response.StatusCode = 200; %> @@ -66,6 +65,5 @@ - diff --git a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/notfound.aspx b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/notfound.aspx index bf2cc2c..c5bec5d 100644 --- a/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/notfound.aspx +++ b/src/Unic.ErrorManager.Website/sitecore modules/Web/Error Manager/service/notfound.aspx @@ -1,6 +1,5 @@ <%@ OutputCache Location="None" VaryByParam="none" %> <%@ register TagPrefix="sc" Namespace="Sitecore.Web.UI.HtmlControls" Assembly="Sitecore.Kernel" %> -<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Analytics" %> <%@ Page language="c#" Codebehind="notfound.aspx.cs" EnableViewState="false" EnableViewStateMac="false" AutoEventWireup="True" Inherits="SitecoreClient.Page.NotFound" %> <% Response.StatusCode = 200; %> @@ -76,6 +75,5 @@ -