Skip to main content
added 83 characters in body
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34

So, the task is to remove one of these templates, but I did not find any code that removes a web template by name. The Uninstall-SPSolution accepts the wsp file name as parameter, but there is only one customer.wsp in the solutions library, so this will probably remove both. Deactivating, removing and uploading template to the solution library didn't help.

So, the task is to remove one of these templates, but I did not find any code that removes a web template by name. The Uninstall-SPSolution accepts the wsp file name as parameter, but there is only one customer.wsp in the solutions library, so this will probably remove both.

So, the task is to remove one of these templates, but I did not find any code that removes a web template by name. The Uninstall-SPSolution accepts the wsp file name as parameter, but there is only one customer.wsp in the solutions library, so this will probably remove both. Deactivating, removing and uploading template to the solution library didn't help.

removed guesses, defined what needs to be done to solve the problem
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34

Update: thisThis is the current script, based on the feedback in the comments:

I checked, and the templates are the same in both places. I don't have powershell access on the PRD machine, so I cannot do any debugging, but the only thing that I can think of is that there are multiple templates with the same title, that are not visible neither in the GUI nor in Designer. I am not sure if this is even possible, but can someone help me how to return the last, active template with this line:

$wtemplate = $web.GetAvailableWebTemplates(1033) | Where-Object {$_.Title -eq $Template}

Ideas for other root cause are also very welcome.

Update 2:Update: Looks like we indeed have double templates with the same title, but different names. However, these extra templates are not visible under "solutions" or in Designer, onder site templates like:


Name                                                Title
{A248FF57-5248-4C8B-9459-1B62703DACCD}#Customers    Customers
{CC69A307-7F92-47A7-8B6F-3981B480F9EA}#Customers    Customers

So, the task is to remove one of these templates, but I did not find any code that removes a web template by name. The Uninstall-SPSolution accepts the wsp file name as parameter, but there is only one customer.wsp in the solutions library, so this will probably remove both.

Update: this is the current script, based on the feedback in the comments:

I checked, and the templates are the same in both places. I don't have powershell access on the PRD machine, so I cannot do any debugging, but the only thing that I can think of is that there are multiple templates with the same title, that are not visible neither in the GUI nor in Designer. I am not sure if this is even possible, but can someone help me how to return the last, active template with this line:

$wtemplate = $web.GetAvailableWebTemplates(1033) | Where-Object {$_.Title -eq $Template}

Ideas for other root cause are also very welcome.

Update 2: Looks like we indeed have double templates with the same title, but different names. However, these extra templates are not visible under "solutions" or in Designer, onder site templates.

This is the current script, based on the feedback in the comments:

Update: Looks like we have double templates with the same title, but different names. However, these extra templates are not visible under "solutions" or in Designer, onder site templates like:


Name                                                Title
{A248FF57-5248-4C8B-9459-1B62703DACCD}#Customers    Customers
{CC69A307-7F92-47A7-8B6F-3981B480F9EA}#Customers    Customers

So, the task is to remove one of these templates, but I did not find any code that removes a web template by name. The Uninstall-SPSolution accepts the wsp file name as parameter, but there is only one customer.wsp in the solutions library, so this will probably remove both.

added 4 characters in body
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34

Update 2: Looks like we indeed have double templates with the same nametitle, but different IDnames. However, these extra templates are not visible under "solutions" or in Designer, onder site templates.

Update 2: Looks like we indeed have double templates with the same name, but different ID. However, these extra templates are not visible under "solutions" or in Designer, onder site templates.

Update 2: Looks like we indeed have double templates with the same title, but different names. However, these extra templates are not visible under "solutions" or in Designer, onder site templates.

found root cause
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34
Loading
added 5 characters in body
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34
Loading
updates based on comments
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34
Loading
Tweeted twitter.com/StackSharePoint/status/903467994004652032
Source Link
vilmarci
  • 916
  • 2
  • 13
  • 34
Loading