Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on the latest Sitecore due to trailing space in item name #1185

Closed
AdamNaj opened this issue Apr 16, 2020 · 1 comment
Closed
Assignees
Labels
bug Oops! Sorry for the inconvenience.
Projects
Milestone

Comments

@AdamNaj
Copy link
Member

AdamNaj commented Apr 16, 2020

Expected Behavior

It's possible to upgrade SPE on the latest version of Sitecore without errors.

Actual Behavior

In our internal tests it turned out that it is not possible to upgrade SPE to 6.1 beta-1 on the latest version of Sitecore because at least one item has a staining space in the item name.

Steps to Reproduce the Problem

Install SPE on the latest version of Sitecore.
Observe the following exception:

ManagedPoolThread #0 2020:04:14 16:12:35 ERROR Error installing items/core/sitecore/system/Dictionary/PowerShell/T/The data for the dialog is not available /{90A4B70F-D65F-477F-A3B0-CF580530DD68}/da/1/xml
Exception: Sitecore.Exceptions.InvalidItemNameException
Message: An item name cannot start or end with blanks.
Source: Sitecore.Kernel
   at Sitecore.Data.Items.ItemUtil.AssertItemName(Item destinationItem, Item sourceItem, String name)
   at Sitecore.Data.Items.Item.set_Name(String value)
   at Sitecore.Install.Items.ItemInstaller.UpdateItemDefinition(Item targetItem, XmlVersionParser parser)
   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)

The following script you used in #1140 exposes the problem

Get-ChildItem -Path "core:\system\Dictionary\PowerShell\" -Recurse | 
    Where-Object { $_.TemplateName -eq "Dictionary entry" } |
    Where-Object { $_.Name -ne $_.Name.Trim() }

returning 1 item. Maybe something to be integrated with package generation procedure?

We would really benefit from having a new package soon, so that we can have the dependency on SPE 6.1 in the next version of SXA.

@AdamNaj AdamNaj added the bug Oops! Sorry for the inconvenience. label Apr 16, 2020
@michaellwest michaellwest added this to the 6.1 milestone Apr 16, 2020
@michaellwest michaellwest added this to Done in Mr. Fixit Apr 19, 2020
@michaellwest
Copy link
Member

michaellwest commented Apr 29, 2020

When upgrading, had to run a script first due to an "item:moving" exception.

image

This issue may be directly related to SXA. Run the following before upgrading.

Get-Item -Path "core:" -ID "{90A4B70F-D65F-477F-A3B0-CF580530DD68}" | Remove-Item -Permanently

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops! Sorry for the inconvenience.
Projects
No open projects
Mr. Fixit
  
Done
Development

No branches or pull requests

2 participants