Blog

0 comments on “Setting up Azure Search in Sitecore Helix”

Setting up Azure Search in Sitecore Helix

This applies to those setting up Azure Search to work with a Sitecore Helix architecture based on the Habitat example and using Sitecore 8.2 Update 3.

Depending on your use case Azure Search is a smart option if you’re hosting in the cloud. The main upside it likely has over SOLR is that its run as PaaS and you don’t need to delve into the SOLR setting files in order to enact scaling and replication. Nor does it require a true Virtual Machine running tomcat, that you may at times need to know how to administer. I’m not suggesting that SOLR isn’t a great project (it is) but it does have a learning curve if you need to tweak things under the hood. Azure Search also has its limitations as listed on this page.

If you’re following the setup instructions (like I was) there is a fairly lengthy step that involves you switching over configuration files. Basically, on a default installation, you need to disable/delete all Lucene file system based configuration files and enable a number of Azure configuration files for Azure Search PaaS.

Using Helix and gulp in Visual Studio all members of your team are probably going to need to replicate these setup steps (without doing anything manually in the running IIS developer instance).  So here are two tricks I used:

ConnectionStrings

Under your Foundation.Indexing module I placed a file called:

CaptureConnectionStrings

ConnectionString.config.transform

<?xml version="1.0" encoding="utf-8"?>

<connectionStrings xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
 <add name="cloud.search"
 connectionString="serviceUrl=https://mysearchinstance.search.windows.net;apiVersion=2015-02-28-Preview;apiKey=7CA4...5"
 xdt:Transform="Insert"/>
</connectionStrings>

 

Gulp Config Rename

In order to automate the deletion of all the Lucene config files I wrote the following Gulp task:

/*****************************
 https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/configure_azure_search#_Create_a_Search
 // If running on Azure Search we need to disable lucene default configs
*****************************/
gulp.task('Z-Search-Disable-Lucene-Configs', function () {

var root = config.websiteRoot + "/App_Config/Include/";
 var socialRoot = config.websiteRoot + "/App_Config/Include/social/";
 var listManagementRoot = config.websiteRoot + "/App_Config/Include/ListManagement/";
 var fxmRoot = config.websiteRoot + "/App_Config/Include/FXM/";
 var testingRoot = config.websiteRoot + "/App_Config/Include/ContentTesting/";

// Main root config folder
 var roots = [root + "Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config",
 root + "Sitecore.ContentSearch.Lucene.Index.Analytics.config",
 root + "Sitecore.ContentSearch.Lucene.Index.Core.config",
 root + "Sitecore.ContentSearch.Lucene.Index.Master.config",
 root + "Sitecore.ContentSearch.Lucene.Index.Web.config",

root + "Sitecore.Marketing.Lucene.Index.Master.config",
 root + "Sitecore.Marketing.Lucene.Index.Web.config",
 root + "Sitecore.Marketing.Lucene.IndexConfiguration.config",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Master.config",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Web.config",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.IndexConfiguration.config",

root + "Sitecore.Speak.ContentSearch.Lucene.config",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Lucene.Index.Web.config",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories. Lucene.IndexConfiguration.config",

root + "Sitecore.Speak.ContentSearch.Lucene.config",
 root + "Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.Xdb.config"
 
 ];




var fxmFiles = [
 fxmRoot + "Sitecore.FXM.Lucene.DomainsSearch.DefaultIndexConfiguration.config",
 fxmRoot + "Sitecore.FXM.Lucene.DomainsSearch.Index.Master.config",
 fxmRoot + "Sitecore.FXM.Lucene.DomainsSearch.Index.Web.config",
 ];




var listManFiles = [
 listManagementRoot + "Sitecore.ListManagement.Lucene.Index.List.config",
 listManagementRoot + "Sitecore.ListManagement.Lucene.IndexConfiguration.config",
 ];




var socialsFiles = [
 socialRoot + "Sitecore.Social.Lucene.Index.Master.config",
 socialRoot + "Sitecore.Social.Lucene.Index.Web.config",
 socialRoot + "Sitecore.Social.Lucene.IndexConfiguration.config",
 socialRoot + "Sitecore.Social.Lucene.Index.Analytics.Facebook.config"
 ];




var testingFiles = [
 testingRoot + "Sitecore.ContentTesting.Lucene.IndexConfiguration.config",
 ];

return Promise.all([
 new Promise(function (resolve, reject) {

gulp.src(roots).pipe(rename(function (path) {
 path.extname = ".config.disabled";
 })).pipe(gulp.dest(root));




gulp.src(fxmFiles).pipe(rename(function (path) {
 path.extname = ".config.disabled";
 })).pipe(gulp.dest(fxmRoot));

gulp.src(listManFiles)
 .pipe(rename(function (path) {
 path.extname = ".config.disabled";
 })).pipe(gulp.dest(listManagementRoot));

gulp.src(socialsFiles).pipe(rename(function (path) {
 path.extname = ".config.disabled";
 })).pipe(gulp.dest(socialRoot));

gulp.src(testingFiles).pipe(rename(function (path) { path.extname = ".config.disabled"; }))
 .pipe(gulp.dest(testingRoot));

}),
 new Promise(function (resolve, reject) {
 del(roots, { force: true });
 del(fxmFiles, { force: true });
 del(listManFiles, { force: true });
 del(socialsFiles, { force: true });
 del(testingFiles, { force: true });
 })
 ]).then(function () {
 // Other actions
 del(roots, { force: true });
 del(fxmFiles, { force: true });
 del(listManFiles, { force: true });
 del(socialsFiles, { force: true });
 del(testingFiles, { force: true });
 });
 
});

 

In order to automate the renaming of all the Azure config files I wrote the following Gulp task:

 

gulp.task('Z-Search-Enable-Azure-Configs', function () {

var root = config.websiteRoot + "/App_Config/Include/";
 var socialRoot = config.websiteRoot + "/App_Config/Include/social/";
 var listManagementRoot = config.websiteRoot + "/App_Config/Include/ListManagement/";
 var fxmRoot = config.websiteRoot + "/App_Config/Include/FXM/";
 var testingRoot = config.websiteRoot + "/App_Config/Include/ContentTesting/";

// Main root config folder
 var roots = [root + "Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config.disabled",
 root + "Sitecore.ContentSearch.Azure.Index.Analytics.config.disabled",
 root + "Sitecore.ContentSearch.Azure.Index.Core.config.disabled",
 root + "Sitecore.ContentSearch.Azure.Index.Master.config.disabled",
 root + "Sitecore.ContentSearch.Azure.Index.Web.config.disabled",

root + "Sitecore.Marketing.Azure.Index.Master.config.disabled",
 root + "Sitecore.Marketing.Azure.Index.Web.config.disabled",
 root + "Sitecore.Marketing.Azure.IndexConfiguration.config.disabled",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Azure.Index.Master.config.disabled",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Azure.Index.Web.config.disabled",
 root + "Sitecore.Marketing.Definitions.MarketingAssets.Repositories.Azure.IndexConfiguration.config.disabled"
 ];

gulp.src(roots) .pipe(rename(function (path) { path.extname = ""; path.basename = path.basename.replace(".disabled");
 })).pipe(gulp.dest(root));

// Testing files

var testingFiles = [
 testingRoot + "Sitecore.ContentTesting.Azure.IndexConfiguration.config.disabled",
 ];

gulp.src(testingFiles).pipe(rename(function (path) { path.extname = ""; path.basename = path.basename.replace(".disabled"); }))
 .pipe(gulp.dest(testingRoot));
 //del(testingFiles, { force: true });

// FXM files

var fxmFiles = [
 fxmRoot + "Sitecore.FXM.Azure.DomainsSearch.DefaultIndexConfiguration.config.disabled",
 fxmRoot + "Sitecore.FXM.Azure.DomainsSearch.Index.Master.config.disabled",
 fxmRoot + "Sitecore.FXM.Azure.DomainsSearch.Index.Web.config.disabled",
 ];

gulp.src(fxmFiles) .pipe(rename(function (path) { path.extname = ""; path.basename = path.basename.replace(".disabled");
 })).pipe(gulp.dest(fxmRoot));
 
 var listManFiles = [
 listManagementRoot + "Sitecore.ListManagement.Azure.Index.List.config.disabled",
 listManagementRoot + "Sitecore.ListManagement.Azure.IndexConfiguration.config.disabled",
 ];
 
 gulp.src(listManFiles)
 .pipe(rename(function (path) { path.extname = ""; path.basename = path.basename.replace(".disabled");
 })).pipe(gulp.dest(listManagementRoot));

var socialsFiles = [
 socialRoot + "Sitecore.Social.Azure.Index.Master.config.disabled",
 socialRoot + "Sitecore.Social.Azure.Index.Web.config.disabled",
 socialRoot + "Sitecore.Social.Azure.IndexConfiguration.config.disabled"
 ];

gulp.src(socialsFiles).pipe(rename(function (path) {
 path.extname = ""; path.basename = path.basename.replace(".disabled");
 })).pipe(gulp.dest(socialRoot));
});

 

I hope this saves you and your team some time when switching over to Azure Search on your Sitecore Helix project. Please leave us some comments if you have some more tips along these lines.

0 comments on “Azure FED Files missing in Helix”

Azure FED Files missing in Helix

When deploying Sitecore to Azure if you come across an issue where your font files are marked as red in the chrome network tab (essentially they are not found), this may help.

Basically, you need to tell the web server to serve files with a particular extension.

In our case, the font files ending with the extension .woff were not getting picked up which results in a number of strange looking fonts around a deployed website.

The solution is to add this to your web.config:

<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension="woff" mimeType="application/font-woff" />
            <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> 
         </staticContent>
    </system.webServer>
</configuration> 

This will tell the Azure web application to serve up files with the given extension as expected.

If you’re working with the Helix Architecture you might like to include this in your Foundation layer.

You could introduce it into a web.config.transform inside your Foundation assets project:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <system.webServer xdt:Transform="InsertIfMissing">
      <staticContent xdt:Transform="InsertIfMissing">
          <mimeMap xdt:Transform="InsertIfMissing" xdt:Locator="Match(fileExtension)" fileExtension="woff" mimeType="application/font-woff" />
          <mimeMap xdt:Transform="InsertIfMissing" xdt:Locator="Match(fileExtension)" fileExtension="woff2" mimeType="application/font-woff" />
      </staticContent>
   </system.webServer>
</configuration>
0 comments on “Helix Development Settings and GIT”

Helix Development Settings and GIT

When you first start out working with the Helix architecture two files will standout as needing to be unique for each developer. Both of these file are part of the habitat example project that you can find here.

  • gulp-config.js (in the root of the project)
  • z.Website.DevSettings.config (\src\Project\Website\code\App_Config\Include\Project\)

These files contain directory locations that are probably going to be unique depending on how a team member sets up their projects.

The trick is that we want these files in git but we also don’t want the developer to check these files in again with there own settings each time.

The solution:

In the respective folders containing the files run the following git command in the cmd prompt:

git update-index --assume-unchanged

Your probably going to want to document this as one of the required setup steps after checking out the project from you git repository.


What if a developer ever needs to change this file and check it in again. They can reverse the process with:

git update-index --no-assume-unchanged
1 comment on “Aceik’s Jason Horne Wins Sitecore “Most Valuable Professional” Award 2017”

Aceik’s Jason Horne Wins Sitecore “Most Valuable Professional” Award 2017

Elite distinction awarded for exceptional contributions to the Sitecore community sitecore_mvp_logo_technology_2017

Melbourne, Victoria, Australia — January 31, 2017, Aceik today announced that Jason Horne has been named a “Most Valuable Professional (MVP)” by Sitecore®, the global leader in experience management software. Jason Horne was one of only 215 Technologist worldwide to be named a Sitecore MVP this year.

Now in its eleventh year, Sitecore’s MVP program recognises individual technology, digital strategy, commerce, and cloud advocates who share their Sitecore passion and expertise to offer positive customer experiences that drive business results. The Sitecore MVP Award recognises the most active Sitecore experts from around the world who participate in online and offline communities to share their knowledge with other Sitecore partners and customers.

Aceik provides a complete range of Sitecore services; architecture, development, integration, support and maintenance, intranets, expert help, existing site audits and upgrades. As Sitecore specialists, Aceik strives to provide excellence in every Sitecore project we undertake.

Aceik contributes to the Sitecore community through thought leadership content on our blog, the Sitecore community blog and stack overflow. We co-founded the Melbourne Sitecore user group, founded the Sitecore ANZ certified developers group and continue to be involved in their ongoing management with the goal to share knowledge, learn and build the Sitecore community within Australia and New Zealand.

“The Sitecore MVP awards recognise and honour those who make substantial contributions to our loyal community of partners and customers,” said Pieter Brinkman, Director of Developer and Platform Evangelism, Sitecore. “MVPs consistently set a standard of excellence by delivering technical chops, enthusiasm and a commitment to giving back to the Sitecore community. They truly understand and deliver on the power of the Sitecore Experience Platform to create contextualised brand experiences for their consumers, driving revenue and loyalty for life.”

Sitecore’s experience platform combines web content management, omnichannel digital delivery, customer insight and engagement, and strategic digital marketing tools into a single, unified platform. The platform is incredibly easy to use, capturing every minute interaction—and intention—that customers and prospects have with a brand, both on a website and across other online and offline channels. The end-to-end experience technology works behind the scenes to deliver context marketing to individual customers so that they engage in relevant brand experiences that earn loyalty and achieve business results.

Aceik is a boutique web development company specialising in the technical implementation and support of Sitecore solutions. 100% of our work is Sitecore related and we pride ourselves on being experts in our field.

Jason Horne, Founder and Sitecore specialist
Aceik
jasonhorne@aceik.com.au
0426971867

More information can be found about the MVP Program on the Sitecore MVP site: http://www.sitecore.net/mvp

0 comments on “Advanced System Reporter Custom Reports Part 4”

Advanced System Reporter Custom Reports Part 4

Custom Viewer Report

For this example, we will build a report which displays a set of results based on a Sitecore Query with a custom viewer to display additional fields from your custom solution.

Requirements:

The report will display all items under the content path selected by the user. The report must also display the “Title” field in the report results in addition to the standard fields.

Let’s build it

Step 1: Open up the ASR source code project in Visual Studio. Find the ItemViewer class, then copy it to your solution in an appropriate library. You will need to reference the ASR and ASR.Reports DLLs.

Rename the viewer to “CustomItemViewer” for the purposes of this example.

Now we can add our custom field to the view by editing the “getColumnText” and “AvailableColumns” methods.

ASRpart8

ASRpart9.png

Step 2: Create a viewer item called “Custom Item Viewer” and configure as per the image. In the Viewer field click edit and add the new Title field to the list in the order you wish to display it in your report.

ASRpart10.png

Step 3: Create a report item called “Custom Item Viewer Report” and configure as per the image.

ASRpart11.png

Step 4: Run the ASR report and find your custom field displayed in the report results in the order you defined in the viewer.

 

0 comments on “Advanced System Reporter Custom Reports Part 3”

Advanced System Reporter Custom Reports Part 3

Simple Custom Parameters Report

For this example, we will build a report which displays a set of results based on a Sitecore Query and custom parameters.

Requirements:

The report will display all items under a path selected by the user in the content tree and only return items of a template selected by the user.

Let’s build it

Step 1: Create a new filter called “Items of Type” and configure as per the image.

ASRpart1

Step 2: Create a Parameter item called “TemplateID” and configure as per the image.

ASRpart2

Note that the root id refers to the root templates folder you wish the user to be able to filter from.

Step 3: Create a report item called “Items by Template” and configure as per the image.

ASRpart3

Step 4: Run the report from ASR. Here you can see we have run the report to return all articles within the categories node of the content tree.

ASRpart4

0 comments on “Advanced System Reporter Custom Reports Part 2”

Advanced System Reporter Custom Reports Part 2

Simple Sitecore Query based Report

For this example, we will build a report which displays a set of results based on a Sitecore Query.

Requirements:

The report will display all items under a fixed path in the content tree and only return items of predefined specific templates. The report query is fixed and doesn’t require any user input via report parameters.

Let’s build it

Step 1: Create a scanner called “Simple Sitecore Query” and add a query as per the image. The query below gets all items under the categories node where the template is one of the three listed types of templates.

ASRpart5.png

Step 2: Create a new report called “Simple Sitecore Query Report” and configure as per the image.

ASRpart6.png

Step 3: Run the report from ASR. Here you can see we have run the report to return all items of the specific templates within the categories node of the content tree.

ASRpart7.png

0 comments on “Advanced System Reporter Custom Reports Part 1”

Advanced System Reporter Custom Reports Part 1

Getting started

Firstly download the install package and the source code. https://marketplace.sitecore.net/en/Modules/A/Advanced_System_Reporter.aspx

ASR reports are easy to configure and most of the time require no custom code to be written.

When a custom report requires coding the easiest way is to follow the examples found in the source code. There are also some filters; scanners etc. which are not in use by the default reports that are very handy and you would not know about them unless you have a browse through the ASR projects.

Basics

ASRpart01

Report: The report item pulls together the configuration elements required for the ASR report: Scanners, Filters, Viewers, and Commands.
Viewer: The viewer item defines the report view, the columns to display etc.
Scanner: The scanner item defines the search query to populate the viewer.
Parameters: The parameter item defines a parameter input control to be used within a report. It defines what type of control and default values to display or select from depending on control type.
Parameter Type: The parameter type item defines a control type to be used by a parameter for a report. The default Parameter types, for example, are Date picker, Dropdown, Text etc.
Filters: The filter item adds filters to the scanner to provide filtered results for the report. Filters have an attribute field which maps a parameter item to a property within your filter class.
Command: The command item adds commands to the report ribbon. The commands can be used to execute functionality on items in the report.

All Items Scanner

The All items scanner is a great utility scanner. It references the QueryScanner which takes a Sitecore query from the attributes field. This allows you to create a report to output the results of any Sitecore query.

ASRpart.png

0 comments on “Missing Sitecore Commerce licenses message”

Missing Sitecore Commerce licenses message

In Sitecore 8.1 you will receive this content warning if you don’t have a valid license for Sitecore Commerce:

“Required license is missing.

You require one of the following licenses to use the Sitecore Commerce Connect module. ‘Sitecore.Commerce.Connect’ or ‘Sitecore.Commerce.ConnectPartner'”

Required license is missing.png

The warning is only useful if you’re intending to use the Sitecore Commerce module, otherwise you need to remove it.

I found this KB post to fix the issue: https://kb.sitecore.net/articles/852031

Here is the patch file you need to add to remove the warning rather than commenting out as suggested above:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>

<!--Remove this warning as commerce module not in use-->
<pipelines>
<getContentEditorWarnings>
<processor type="Sitecore.Commerce.Pipelines.ContentEditorLicenseWarning, Sitecore.Commerce">
<patch:delete />
</processor>
</getContentEditorWarnings>
</pipelines>

</sitecore>
</configuration>
0 comments on “Aceik’s Jason Horne Wins Sitecore “Most Valuable Professional” Award”

Aceik’s Jason Horne Wins Sitecore “Most Valuable Professional” Award

Technology2016Elite distinction awarded for exceptional contributions to the Sitecore community

Melbourne, Victoria, Australia — February 22, 2016 — Aceik, today announced that Jason Horne, Founder and Technical Lead has been named a “Most Valuable Professional (MVP)” by Sitecore, the global leader in experience management software. Jason Horne was one of only 177 people worldwide to be named a Sitecore Technology MVP this year. There are more than 10,000 certified developers in Sitecore’s global network.

Now in its tenth year, Sitecore’s MVP program recognizes individual technology, digital strategy, and commerce advocates who share their Sitecore passion and expertise to offer positive customer experiences that drive business results. The Sitecore Technology MVP Award recognizes the most active Sitecore experts from around the world who participate in online and offline communities to share their knowledge with other Sitecore partners and customers.

Aceik provides a complete range of Sitecore services; architecture, development, integration, support and maintenance, intranets, expert help, existing site audits and upgrades. As Sitecore specialists, Aceik strives to provide excellence in every Sitecore project we  undertake.

Aceik contributes to the Sitecore community through thought leadership content on our blog, the Sitecore community blog and stack overflow. We co-founded the Sitecore Melbourne meetup group, founded the Sitecore ANZ certified developers group and continue to be involved in the ongoing management of these groups with the goal to share knowledge, learn and build the Sitecore community within Australia and New Zealand.

“We are grateful for the leadership, expertise, and ongoing contributions that Jason Horne has made to the Sitecore community,” said Pieter Brinkman, Director of Developer and Platform Evangelism, Sitecore. “Jason Horne has demonstrated a mastery of our technology and exemplifies the spirit of Sitecore.”

Sitecore’s experience platform combines web content management, omnichannel digital delivery, customer insight and engagement, and strategic digital marketing tools into a single, unified platform. The platform is incredibly easy to use, capturing every minute interaction—and intention—that customers and prospects have with a brand, both on a website and across other digital channels. The end-to-end experience technology works behind the scenes to deliver context marketing to individual customers, so that they engage in relevant brand experiences that earn loyalty and achieve results.

Aceik is a boutique web development company specialising in the technical implementation and support of Sitecore solutions. 100% of our work is Sitecore related and we pride ourselves on being experts in our field.

Jason Horne, Founder and Technical Lead
Aceik
jasonhorne@aceik.com.au
0426971867