Problems after upgrading from SXA 1.8.1


Description

When installing the Sitecore Experience Accelerator (SXA) 1.9 or a later package, some of the templates are merged incorrectly, and the items created with those templates are incomplete. This causes issues with SXA scaffolding and potentially other features.

Note that upgrading to SXA 10.x might result in the following unhandled exception:

ERROR Error installing items/master/sitecore/templates/Foundation/Experience Accelerator/Scaffolding/Actions/Site/OBSOLETE/ExecuteScript/{B06460C2-8B7B-47A5-9E2C-F966F689B6CA}/en/1/xml
Exception: Sitecore.Exceptions.DuplicateItemNameException
Message: The item name "ExecuteScript" is already defined on this level.
Source: Sitecore.Kernel
   at Sitecore.Data.Items.ItemUtil.AssertDuplicateItemName(Item destinationItem, Item sourceItem, String name)
   at Sitecore.Data.Items.Item.MoveTo(Item destination)
   at Sitecore.Install.Items.ItemInstaller.InstallItem(BehaviourOptions installOptions, Item targetItem, ItemReference item, XmlVersionParser parser, Boolean& removeVersions)
   at Sitecore.Install.Items.ItemInstaller.GetVersionInstallMode(PackageEntry entry, ItemReference reference, XmlVersionParser parser, ItemInstallerContext context, Boolean& removeVersions)
   at Sitecore.Install.Items.ItemInstaller.InstallEntry(PackageEntry entry)

Solution

To resolve the issue with the missing fields under some templates, consider the following options:

Note: Before the upgrade, make sure that you have a backup of your custom scaffolding actions (actions of type ExecuteScript are affected).