FXM Tracking error

Lately, I was analyzing Sitecore logs and I found recurring error indicating that evaluation of condition failed. Rule item ID: Unknown, condition item ID: {1411557E-EB7F-4150-A369-1E89E6FAC133}.

FXM Rule

After the investigation I find out, that Sitecore FXM module code is using for his internal logic two query parameters: page and url. If your external website is using it, it will raise an exception.


namespace Sitecore.FXM.Rules.Contexts
{
public class RequestRuleContext : ValidatingRuleContext
{
private Uri url;
public HttpRequestBase Request { get; protected set; }
public Uri Url
{
get
{
if (this.url == (Uri)null && this.Request.QueryString != null)
{
string uriString1 = this.Request.QueryString["url"];
if (!string.IsNullOrWhiteSpace(uriString1))
{
this.url = new Uri(uriString1);
}
else
{
string uriString2 = this.Request.QueryString["page"];
if (!string.IsNullOrWhiteSpace(uriString2))
this.url = new Uri(uriString2);
}
}
Uri url = this.url;
if ((object)url != null)
return url;
return this.url = this.Request.Url;
}
}
public Uri Referrer
{
get
{
return this.Request.UrlReferrer;
}
}
public Language Language {get; set; }
public RequestRuleContext(HttpRequestBase request)
{
this.Request = request;
}
}
}

Unfortunately, page parameter is used often in paging context and in my case I have no control on Website that FXM is referring to.

ex. https://%5Bwebsite%5D/it-jobs/results?location-facet=Charlotte,NC&page=3

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s