An error occurred while the batch was being executed. Updating database: Failed. SQLClient Data Provider: You must remove all users with password before setting the containment property to NONE. Sitecore9 Installation with SIF error.

SQL error Sitecore9 Installation

This error usually occurs when you get another error and you trying to re-run the script after fixing it.

Installation script contains code of creating databases. If error X is thrown after executing few of the line of this script. Now, some databases are created by this script in the sql. If you fix that X error and try to executing the script again, as some databases are already created, it will throw this SQL script error.

To solve this, what you need to do is, just go to SQL management studio, connect the sql server and delete all the databases which are related to Sitecore9 Installation and then try to execute Sitecore9-Installation script again. That’s it.

Enjoy Sitecore9 installation..

Happy Coding 🙂

Advertisements

The term C:\Program Files\iis\Micorsoft Web Deploy V3\msdeploy.exe is not recognized as the name of a cmdlet, function…. Sitecore 9 SIF installation error

Hello Sitecore developer,

While installing Sitecore 9, I was stuck with the following error:

Install-SitecoreConfiguration: Cannot validate argument on parameter ‘Path’. The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: The term ‘C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

 

Web-Deploy Error

 

It is very easy to fix this error. What you need to do is just download and install IIS web-deploy. Click on the link to download the web-deploy tool: WEB-DEPLOY TOOL

That’s it. Let the Sitecore 9 installation ball rolling….

Microsoft Web Deploy

Sitecore – Remove Unreferenced / Unused media items

Hey Guys,

  • Do you have too many media items and you are not sure which items are unused or unreferenced?
  • Do you want to list-out/delete such unused or unrferenced media items?
  • Do you want a simple and easy way to do this?

Here is the tool available on the Sitecore Market Place which list-out all the unused / unreferenced media items: UnRef-Media. All the versions:  Sitecore  8.0 onwards are supported. It also supports Sitecore 7.2.

https://marketplace.sitecore.net/en/Modules/U/UnRefMedia.aspx

Best thing about this package/tool is that no extra configuration / dll is needed to run this. The package contains single aspx page.

  • Choose your database
  • Choose the root folder of Media
  • Hit the “Go” button

And you will get the list of unreferenced media.

  • You can sort this list based on the item-name or item-path
  • You can also search for perticular item by its name or path
  • You can delete / move single/multiple items to recycle bin.
  • Preview on hover

If you are confused whether to delete the media item just by its name then hover on the media name and you will get preview of the image. Click on the media item name to view full image.

Below is the demo how this tool works:

Unused / Unreferenced Media

 

How to know current date time of Sitecore Content Management Server

What if you are accessing a Sitecore Content Management (CM) server which is located in a different timezone than your local machine.

Sometimes (Especially working with log files) it will be very difficult to get the actual time  of the Sitecore CMS server and map it  to your local machine (By adding timezone difference). But what if you are not aware of Sitecore CMS server timezone.

  • One way will be having an aspx page on Content Management Server  which display the Current Time

But what if you don’t have that page and you quickly want to know the current time of CM server?

It’s simple and quick (tip/trick):

  • Go to any item which has field of DateTime type. Click on the “Now” link above it. And you will have the current time of the CM server. 😉
    Once you get the current time, discard your changes by not saving that item.
  • If you don’t have any DateTime field then create one temporarily.currenttime

That’s it.

Happy Coding 🙂

Solving Experience Editor Slowness part-2

In part-1, we have analyse the load time of Experience Editor with different options available like Optimized Compilation, Sheer UI and disabling Suggested Test Count. We have also found that the Suggested Test Count request is time consuming.

So, Instead of disabling Suggested Test option from the header ribbon, what if we disable the Suggested Test Count request call?

First it is better to know how the Suggested Test Request works while Experience Editor loads.

As per the name, Suggested Tests are the tests suggested by Sitecore to run. Sitecore continually analyzes the tests run on the website and the usage of the website in general, and uses this analysis to suggest new tests to run. Go through Test Lists document by sitecore for more information.

This suggested Tests are stored in sitecore_suggested_test_index and displays them in the list and as a count in the ribbon. As per default configuration, a crawler uses /sitecore/content as the root location in the content tree to start from when it populates this index. It would be better to change this path to the navigable content. The configuration file for sitecore_suggested_test_index is at App_Config\Include\ContentTesting\Sitecore.ContentTesting.Lucene.IndexConfiguration.config or Sitecore.ContentTesting.Solr.IndexConfiguration.config file. While Experience editor loads, total number of suggested test (Tests suggested by Sitecore) is calculated and displayed in the ribbon.

So now back to our issue: let’s disable suggested test count call while Experience editor loads. Sitecore support suggest an awesome solution for this.

This Suggested Test Count request is executed from .js file: ShowSuggestedTestCommand.js located at #RootFolder#\sitecore\shell\client\Sitecore\ContentTesting\ShowSuggestedTestCommand.js

In this file, locate the below code:

 canExecute: function (context) {
      var testCount = context.app.canExecute("Optimization.SuggestedTests.Count", context.currentContext);
      var outputEl = $("a[data-sc-id='Suggested-Tests'] span");
      var counterSpan = "<span> (" + testCount + ")</span>";

Now we will change values of two variables: testCount and counterSpan. Assign 0 to testCount and “” to counterSpan. Final code will look like following:

 canExecute: function (context) {
      var testCount = 0;
      var outputEl = $("a[data-sc-id='Suggested-Tests'] span");
      var counterSpan = "";

Or else you can download ShowSuggetedTestCommand.js and replace your copy with it.

And finally, here is the impact of our action.

Environments Normal Page Load Time Applying Optimized Compilation – OC OC + Sheer UI Speak UI + Disabling Suggested Test Count Request Just Removing Count figure(ShowSuggestedTestCommand.js)
Env 1 1m 9s 32.04s 16s 29.98s 28s
Env 2 2m 8s 1m 30s 40s 56s 54s

 

It works, right? It takes less time than disabling the Suggested Test Count. And on top of it, it has Suggested Test functionality available in the ribbon of Speak UI.

That’s it.

Happy Coding 🙂

 

Solving Sitecore Experience Editor Slowness part-1

We were facing an issue of Experience editor load time. It is taking too much time to load than usual. We have followed the guidelines suggested in the following kb article:
https://kb.sitecore.net/articles/672774
Optimized Compilation and using the Sheer UI instead of Speak makes things better. See the below table:

Environments Normal Page Load Time Applying Optimized Compilation – OC OC + Sheer UI
Env 1 1m 9s 32.04s 16s
Env 2 2m 8s 1m 30s 40s

But what if we want to keep Speak UI?
We have started observing the different components load time and we found that Suggested Test Count is causing the issue.
ExpEditor-SuggestedTestCountLoadTime

Check which component/request is causing the slowness in your case. If it is My Items, then you can refer following kb article from Sitecore: https://kb.sitecore.net/en/Articles/2015/12/04/14/31/549951.aspx

Suggested Test Count takes more than 70% of Page load time. So, using the following link we have disabled the Suggested Test Count.
https://blog.horizontalintegration.com/2015/07/05/sitecore8-experience-editor-slow/

And after disabling the Suggested Test count we are getting improved result with Speak UI.

Environments Normal Page Load Time Applying Optimized Compilation – OC OC + Sheer UI Speak UI + Disabling Suggested Test Count Request
Env 1 1m 9s 32.04s 16s 29.98s
Env 2 2m 8s 1m 30s 40s 56s

So, it helps us to minimize the load time but yes, then Suggested Tests will not be visible on the ribbon.

Exp.Editor Image without SuggestedTest Count Label
But what if we need Suggested Test functionality in the ribbon? Yes, that is possible. Here is How..