0 Comments

Related image

What’s new in Sitecore 9.1?

Sitecore Host Base

Sitecore is going to extract the services in Sitecore.kernel into individual independent services i.e. caching, logging, messaging etc. and make them single responsibility. 

image

Sitecore Host is a console application built with .Net core. It’s a abstracted host base, brings a common platform for developing additional functionality.  It supports both .net core  and full framework.  It is powering apps and services like Sitecore Identity, Horizon, as well as universal tracker.

image


Sitecore Identity

Sitecore identity is a plug-in to the open source, it provides single sign on, allows to combine with external AMI system, and old membership.

image


Horizon

Horizon is the next generation experience for content management, it reduces time to value significantly with focus on the need of tomorrows user profiles.  out of the box features for easy adoption and utilization of the full Stiecore potential. It also provides a user interface that is just as powerful and innovative as the engine behind.

It provides a personalized hub into the world of Sitecore services, creating experiences powered by insights, as well as controlling and optimizing all marketing activities.

image

The architecture o f Horizon as shown below. As mentioned above, Horizon is one of the service built with .net core and hosted on Sitecore host base. It communicates with Sitecore Content Management Sever via message bus.

image


Cortex

Sitecore Cortex is a Machine Learning engine for generating real-time insights of customer data. Cortex will become the key of future smart CMS.


Universal Tracker

Universal tracker allows mobile developers for tracking all user interactions, and soon Sitecore mobile SDK will support personalization on mobile native apps.

0 Comments

Image result for WFFM Sitecore

Have you ever seen “sitecore://web/{358B0E87-893A-45A8-A707-D19A32962DFF}?lang=en&ver=1” this value? If you are using WFFM with attachment field, you are most likely going to see this value in the Excel file downloaded from the form.  This is because WFFM doesn’t manipulate data during exporting data into Excel, which means data formatting will be the same as it’s stored in the database.  


Understand how it works

For solving the issue, let’s get understood how it works.  First of all, what’s the Guid in the URL?  It’s a media library item ID.  If you search the ID in Sitecore, you can find that item in media library.  The attachment will be created in Media Library Once the form is submitted.   By default,  it’s stored in Master database, however you are allowed to change to Web database with below settings.  In my case,  I don’t want to change this to store in web database, as the attachment is not mean to be accessible from public.    

<setting name="WFM.MasterDatabase" value="web" />

The attachment is just a media library item, which you use MediaManager.GetMediaUrl for getting the URL (As shown in screenshot below)

image


Solutions

Now, you should understand how it works, and let’s fix the export value together.  First of all, we need to find out which pipeline is for exporting the data into Excel. Luckily, It’s not so hard to find. It’s registered in the exportToExcel pipeline:

image

Next is to customize the ExportFormDataToExcel function, here is the code snippets

Finally, if you export data into Excel again, the wired URL is fixed with a valid media item URL!. 

0 Comments

Today I came across a publishing issue in our UAT environment.  After I clicked the publish, the publish popup window doesn’t display and in the console log it is showing an error  “because it set multiple X-Frame-Options” headers with conflicting values (‘SAMEORIGIN, Allow-From’…) Falling back to ‘deny’.” as shown below.

image

image

 

So, I checked the web.config file and noticed that someone added  “ALLOW-FORM” X-Frame-Option in web.config.

image

The error is because from sitecore 8.1 update 3 onwards sitecore introduce default module to add X-FRAME-OPTION Sameorigin using below module

<add type="Sitecore.Web.XFrameOptionsHeaderModule, Sitecore.Kernel" name="SitecoreXFrameOptionsHeaderModule" />

0 Comments

 

Recently, I’ve been working on Sitecore commerce project. In the post below, I’m going to share the experience about how I troubleshoot the issue and get it solved eventually.

Issue

The issue I encountered in creating a commerce user.  customerServiceProvider “createUser” throws an exception

An element with the specified key already exists., however the commerce user and sitecore user were successfully created. So WHY?

 

Troubleshooting

The initial suspicion was there are some duplications in the database. so I double checked UserObject table, the Addresses table (because I also add billing address and shipping address for the user), as well as the aspnet_Users table in Core database.   Unfortunately they all looks clean and right, no duplications.

Then I thought that maybe there are some other tables gets updated while creating a new user, so I opened the “SQL Server Profiler” tool trying to track all the database queries.  NO luck.

 

an-idea

Ultimately, I found the issue. it was because when delete a user in Sitecore, it does delete both commerce user and Sitecore user, BUT not contacts in xDB.  Just for the proof of concept, I removed the contact and identifier from xDB. Bingo! It fixed the issue.

0 Comments

Today while doing self-testing, I found that OTB facet filter component doesn't work as expected. After digging into the code, it is surely a Sitecore SXA bug.  Therefore,  I decided to share this and hope this can help you to understand the issue and quickly solve it.   

What’s the issue?

The screenshot below, it has 3 properties, and I assigned different property type for each of them (for testing purpose).  The expected result would be Apartment(1), House and Land(1) and Townhouse (1). However, it is indicating (2) items per type?  Why?!

image

My first question was that is this because of multi-languages? After looking into the code, I found the answer, it’s because the facet component ONLY takes the search scope as its search criteria, which means the results contains multiple items with different language.

image

Here is the screenshot for the index,  As you can see It has two items with the lottype equals to “House and Land”, one is Chinese version and the other is English version.  That’s why the facet indicates (2) items per type in the example above. This bug could cause the discrepancy between search results and facet filtering, if you are implementing multi-language website.

image

Fortunately, This bug has been fixed in SXA 1.6, for all previous version please create a ticket in support portal for  requesting the patch for your SXA version.