Tuesday, November 27, 2018

Installing SXA SOLR Indexes quick tips

Just a few quick tips and trick I have picked up when installing Sitecore SXA 1.7 (update 1) 

The process goes like this: 


  1. Install Sitecore 9 
  2. Install Powershell Extensions (Apparently version 5 of the full package works fine but I tend to stick with recommended versions so went with 


4.7.2 for Sitecore 8/9
Full 4.7.2 release for Sitecore 8/9

Find it here: 

https://marketplace.sitecore.net/Modules/Sitecore_PowerShell_console.aspx

3. Install SXA 

Download: https://dev.sitecore.net/~/media/1FF242BE683E4DE989925F74B78978FC.ashx
Installation Instructions: https://dev.sitecore.net/~/media/C9C535C21F8A4455BCF1F7F6C7AB1D1D.ashx

4. Rebuild indexes
5. Rebuild Link Databases

Should all be done right? I mean the indexes are defined in 

\App_Config\Include\Z.Foundation.Overrides\Sitecore.XA.Foundation.Search.Solr.config

And are shown in the indexing manager: 






But there's a bit in the installation manual you should read closely:

Create SOLR SXA cores 


After installing SOLR and connecting it to your Sitecore instance, you may notice that a number of default Sitecore platform cores have been added. In SOLR a core is an instance of a Lucene index and contains the configurations for that index. Each index should have its own core, therefore for each custom index you wish to create for SXA, you must create a core.

 To create your SOLR SXA core: 
1. Duplicate core directory created for sitecore_master_index (or company_name_master_index) twice and rename to: 


  • sitecore_sxa_master_index 
  • sitecore_sxa_web_index
You then need to add the cores to SOLR through the Solr Admin page usually: https://localhost:8983/



All good so far - but there is two tricks you also need to do or else when you try and re-index these two new indexes, it will take a micros-second and nothing will happen:

  • Restart the Solr service so it picks up the new indexes 

  • Restart IIS or your website 

You can then reindex properly and eveything will be hunky dory 

Also note missing these indexes will definitely cause errors later on. 

Lastly SXA 1.7 Update 1 supports custom indexes as described here:


 





Sunday, October 14, 2018

An amazing thing happened at Symposium

Well as I pack my bags to head back to Auckland, I have a million exciting things I have learnt this year and have come away with a huge goody bag of new tools, techniques, insights and pure excitement around the impending release of Sitecore 9.1 and SXA 1.8 (again thank you, thank you Adam Najmanowicz @adamnaj)

But the best thing that happened wasn't about Sitecore directly. It was about people and how a community of genuine, caring people can come together to make a huge difference.

If you don't know the MVP community lost one of their own a few weeks ago in a tragedy. Ryan Bailey was a true friend and a great guy who personified what it was to be a Sitecore MVP. Almost without exception when he found something new, whether a bug or a better way of doing something, he shared it with us all through his blog 

https://blog.ryanbailey.co.nz/

Ryan was the most prolific blogger I have ever seen and helped so many through so many channels.

And to be honest, his passing left me wondering if I would be able to go on working with Sitecore, it was a shared passion that bound us together and I didn't think it would ever be the same again, and it some ways it never will be.

But then a truly amazing thing happened.

Kamruz Jaman (@jammykam) , and Akshay Sura (@akshaysura13 ) - started chatting on the Slack channel after the news had broken and wanted to do something to send some support to his family. It started with flowers and very soon had grown into a givealittle page: https://givealittle.co.nz/cause/support-for-ryans-family

And before Symposium we had managed to raise around 5k which was great by me and I'd prepared myself that if we made that, I'd be satisfied.

In some ways I was dreading Symposium, I thought I had managed to tell most folk, but knew there would be many who would only find out in Orlando, so I was prepping for a heavy load, mostly I was planning to hide in a corner and try not to cry too much in public.

But again, an amazing thing happened. From day one I was humbled and continually moved by the support and kindness shown by every single person who knew Ryan, knew of Ryan or had the heard the devastating news. 

Then came the MVP summit and this is where things went next level real fast. Day one started with a minutes silence for Ryan and a memorial slideshow, and it is here I have to give a huge shout out to Pieter and Tamas for organising all of this and catching me as I skulked around the hall, making sure I had a heads up and had time to emotionally prepare - forever in their debt.

The rest of the day and the next morning was a blur of exciting recaps and deep dives, SXA, JSS, Universal Tracker, Horizon and much more, not sure I remember much detail but I took a lot of pictures and the slide decks are rolling out as we speak which sorts out my FOMO. 


For the whole afternoon on day two, the main room screens looked like this:





The shortened link lead them to this page:  https://givealittle.co.nz/cause/support-for-ryans-family


Well, the night before this fellow named Corey Smith (@sitecorey) who was a friend of Ryan's as well, (He lives in Atlanta Georgia and is a true Southern gentleman)



Check out that stache, it becomes very important later in the story


Well he promised on Twitter that if donations went past 10k he would shave off the hideous toilet brush we have teased him about for years.

He may have thought his stache was safe as we were only at about 6k but things rapidly took a different turn, as you might expect from a bunch of geeks.

Yes Twitter lit up, hash tags were created and the whole community piled in boots and all.


Then this guy weighed in and said he’s lose his beard if we made 12k – this is Kam Figy (@kamsar) by the way .


Well thanks to some very generous people we got to this in a little under 4 hours.


So this had to happen – live on stage in front of the whole MVP summit who all filmed it and gathered round to cheer and make jokes at Corey’s expense, the moustache was removed. ("little boy have you lost your Momma")


The whole shaving video can be seen on youtube here:



And here we are after, Kam lost the beard but understandably was nervous about Pete shaving it, so discretely did it himself.


But the day hadn't finished throwing up amazing stuff.




So this has now turned into an annual thing where we will all grow gross facial hair and then have a mass shave off at the end of our next summit, which is a great thing to come out of it. 

Not only have we provided incredible support to his family, we have also firmly embedded the notion that while we are just people who work with a software product, we are also a powerful community capable to helping, healing and doing some very good things. 

As Ryan's sister said to me "I'm just so happy he had you and the others. I've never come across a workplace where the people were family. Hopefully one day" 

Bearing in mind we are a geographically distributed family, this is truly an amazing thing and we can all be proud of what we achieved.

Shout Outs!

  • Pieter, Tamas, Jason and the the whole MVP team at Sitecore
  • Corey Smith - mate you are a rare gem indeed
  • Kam Figy - I know you loved that beard and doing a #SitecoreStacheExchange couldn't have been easy 
  • To all the MVPs who leaped into the spirit of the things and generously donated both in kind words, money and fabulous jokes.
  • Horizontal Integration  for making absolutely sure the shaving happened - nailed it!
  • Mike Reynolds for his steady support, never ending humour and sensitivity
  • Pete Navarra for fussing around the chair arrangement on stage, working with the hotel to provide towels, water and the most tender shave I have ever seen (sorry about the blunt razors Corey) and MCing the whole show.
To one and all, I will never forget this incredible event that brought healing and closure to so many of us, such good things coming from a tragedy are a tribute to you all and I thank you from the bottom of my heart.

Bruce Davis-Goff (@NZsitecore)





















Tuesday, March 20, 2018

System.Collections.Concurrent.ConcurrentBag Has a hissy fit.


It's well acknowledged that installing Sitecore Commerce 8.2.1 can be beastly to install and more so in a scaled environment. I have done many times now, I was beginning to find it straightforward... let your guard down for a moment and BOOM! Microsoft come a'callin. 

All credit to Tan Vu from Sitecore support, he's great ! - I'm just the documenter. 

Unable to cast object of type 'System.Collections.Concurrent.ConcurrentBag`1[Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration]' to type 'System.Collections.Generic.IReadOnlyCollection`1[Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration]'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Collections.Concurrent.ConcurrentBag`1[Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration]' to type 'System.Collections.Generic.IReadOnlyCollection`1[Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration]'.

 


This is what might have happened to you:
  • .NET framework 4.5.2 contains System.Collections.Concurrent.ConcurrentBag<T> class from System.dll which implement IReadOnlyCollection<T> interface, but due to the some security updates from Microsoft side, ConcurrentBag<T> was changed, and as a result, it does not implement IReadOnlyCollection<T>. In order to check whether one of the aforementioned security updates was installed on your server, you can review the version of C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll 
    For the regular .NET framework 4.5.2 this version looks like 4.5.2... , but if security update was installed it will look like 4.0.30319.36388 (It seems to me that these security updates were built based on .NET framework 4.0 which did not have IReadOnlyCollection<T> interface at all.
  • In this way, if the server has .NET framework 4.5.2 without aforementioned security updates, provided by Microsoft, then System.dll will have System.Collections.Concurrent.ConcurrentBag<T> which implement IReadOnlyCollection<T> interface, in contrast to .NET framework 4.5.2 with security update. This error may happen because of these security updates.
Thus, to fix this problem, please update the .NET framework version on your server to at least 4.6.1
Then, please update the following configuration on your Web.config file:

  • <compilation defaultLanguage="c#" debug="false" targetFramework="4.6.1">
  • <httpRuntime targetFramework="4.6.1" ..

Thanks again Vu Tan!

Hope this helps someone out there who doesn't have a Vu Tan to lean on :-) 










Sunday, March 4, 2018

Hackathon 2018 in New Zealand



Azure 

As a pseudo developer (with impostor syndrome 50% of the time) I am over it! - By that I mean configuration -  hours of of messing around in config files, searching, replacing (seriously guys JSON is for machines), SIF and SIFLess are fun, but I think all this is headed for automation.

It doesn't mean developers will disappear, (though sometimes the marketing department wishes they would) but I believe we will become accustomed to telling a machine how to do our job a lot more than we do now. 

With all that in mind, I spun up a quick instance of Sitecore on an Azure portal, everything just worked and it took 52 minutes. I'm completely sold on how easy it was and hope to never do it any other way. 



Just to balance that, here's the costs for a day and a half with minimal usage.

The Poutineers 

Sitecore List & Contact Knowledge Share - Slacks


Kiwis and Canadians have a natural affinity I feel, so it was a delight to be considered by Chris Williams. My fellow Marmite Muncher Ryan Bailey was also onboard. 

Now I have to say, our concept is a good one, really good. Privacy advocates might shrink back while marketing types shriek with delight, but I love the idea of preemptively building anonymous Contacts from likely channels using machine learning to sift for targeted profiles.  

One could then do some cool strategies to identify and connect these Contacts and bingo! Instant in-depth profile!!



It's a big idea and Chris was sensible to contain it to a simple demo where we displayed a list of articles based on the keywords and IDs extracted from a single slack channel.  

Even so were still firing stuff up minutes before the cut-off and it's pretty raw, but exciting.

The real fun bit will be wiring up the ML and pulling in cognitive services. Want to know how my site knows you like kittens? Well you sure have posted a lot of pictures of them all over the net :-)  This would work even better with identified contacts, rainbow unicorn dragon kittens.

Thank you Chris and Ryan you letting me participate, a very cool idea came out it so I feel like we've already won.
I also learnt Surface Books can overheat doing video rendering,  mmm toasty.