We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running the following command should work without error.
$item = Get-Item -Path "master:" -ID "{5C761140-7076-4F82-A2D9-473FDC5635C8}" $newTemplate = Get-Item -Path "master:" -ID "{B0B6FB08-6BBE-43F2-8E36-FCE228325B63}" Set-ItemTemplate -ID $item.ID -TemplateItem $newTemplate
An error is returned stating that the object is null.
The text was updated successfully, but these errors were encountered:
An edge case was revealed in this Sitecore Stack Exchange question.
Turns out that the issue happens when calling item.ChangeTemplate() but can be fixed when calling TemplateManager.ChangeTemplate().
item.ChangeTemplate()
TemplateManager.ChangeTemplate()
Sorry, something went wrong.
#1138 : Fixed issue when the original template is missing.
ada6fd0
#1138 : Updated for another use case.
505b382
#1138 : Verbose is probably more appropriate for this message.
da7c76c
The developer may already know that the template is missing.
@dresser hopefully this simplifies your script in the near future.
michaellwest
No branches or pull requests
Expected Behavior
Running the following command should work without error.
Actual Behavior
An error is returned stating that the object is null.
The text was updated successfully, but these errors were encountered: