I've install Vanilla Sitecore 9.1.1 with Commerce 9.1 and SXA 1.8.1. I tried to create and new Site under a new Tenant. It gives me the following error:

Something went wrong. See SPE logs for more details.

I dug into the logs and found this:

5656 16:34:06 INFO  Script item set to master:\system\Modules\PowerShell\Script Library\SXA\SXA - Scaffolding\Content Editor\Insert Item\Site in ScriptSession $scriptSession$|x5hkxno1efdedznlpc4q5mrs|60221baf-13cc-4d5b-92c8-a7ee96a31eb3.
ManagedPoolThread #3 16:34:06 INFO  Executing a script in ScriptSession '$scriptSession$|x5hkxno1efdedznlpc4q5mrs|60221baf-13cc-4d5b-92c8-a7ee96a31eb3'.
ManagedPoolThread #3 16:34:09 ERROR You cannot call a method on a null-valued expression.
ManagedPoolThread #3 16:34:09 INFO  The script execution in ScriptSession '$scriptSession$|x5hkxno1efdedznlpc4q5mrs|60221baf-13cc-4d5b-92c8-a7ee96a31eb3' completed in 2663 ms.

I dug dipper and found the New-Site powershell script (which later calls Show-NewSiteDialog) complains it can't find an item with ID:


I ran Show-NewSiteDialog script manually in Powershell ISE. It gave me few errors as below but at the end rendered the dialog.

Initialize-Item : Cannot bind argument to parameter 'SearchResultItem' because it is null.
At line:15 char:156
+ ... ultisite.IMultisiteContext]).GetTenantItem($CurrentItem)  | Wrap-Item
+                                                                 ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Initialize-Item], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Cognifide.PowerShell.Commandlets.Data.InitializeItemCommand

VERBOSE: Cmdlet Get-TenantItem - End
Get-Item : Object reference not set to an instance of an object.
At line:17 char:3
+         Get-Item -Path master: -ID $tenantItem.Templates
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Item], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.GetItemCommand

VERBOSE: Cmdlet Get-TenantTemplatesRoot - End
Get-TenantTemplate : Cannot bind argument to parameter 'TenantTemplatesRoot' because it is null.
At line:44 char:47
+ ... emplates = Get-TenantTemplate (Get-TenantTemplatesRoot $SiteLocation)
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-TenantTemplate], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-TenantTemplate

I'll appreciate any help resolving this issue.

  • You should probably contact Sitecore support in case the script is missing. – Michael West Oct 30 at 6:05
  • I assume you also installed the Sitecore PowerShell Extensions module? – Mathijs Vlasveld Oct 30 at 9:54
  • @Mathijs, Yes that's already installed. – Ben Oct 30 at 22:34
  • I realised the issue is due to "Sitecore Commerce Experience Accelerator Storefront" hasn't been installed and hence SXA Storefront hasn't been created. This is the package has the manual script update and package up again. Even with that I still couldn't make it work. The next thing I gonna try is I will get the scripts this package creates from a live website and import it to my instance and run SXA Srtorefront task again. – Ben Nov 1 at 3:06
  • Apparently the issue was related the package I mentioned before. It was the way Sitecore mentioned in the installation document how to update the package. With the help I this post I could make it work: xcentium.com/blog/2019/10/22/… – Ben Nov 1 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.