SOLVED
Home

PnP templates lose colours

%3CLINGO-SUB%20id%3D%22lingo-sub-145411%22%20slang%3D%22en-US%22%3EPnP%20templates%20lose%20colours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-145411%22%20slang%3D%22en-US%22%3E%3CP%3EWith%20the%20latest%20releases%20of%20PnP%20PowerShell%20I've%20tried%20exporting%20sites%20(%20Get-PnPProvisioningTemplate)%20and%20then%20apply%20the%20template%20to%20another%20site%26nbsp%3B%3CSPAN%3EGet-PnPProvisioningTemplate.%26nbsp%3B%20When%20I%20do%20this%20I%20noticed%20that%20the%20colours%20configured%20within%20%22Site%20Settings%20-%20%26gt%3B%20Change%20the%20look%22%20are%20being%20ignored.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI'm%20quite%20sure%20in%20the%20past%20the%20.spcolor%20files%20were%20exported%20with%20the%20templates.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWhen%20I%20look%20in%20the%20template%20file%20I%20see%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%26lt%3Bpnp%3AComposedLook%20Name%3D%22%22%20ColorFile%3D%22%22%20FontFile%3D%22%22%20BackgroundFile%3D%22%22%20Version%3D%220%22%20%2F%26gt%3B%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%3EIt%20looks%20like%20the%20Composed%20Look%20is%20being%20ignored.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWhen%20I%20ran%20this%20through%20the%20debugger%20I%20found%20that%20the%20theme%20doesn't%20have%20a%20name%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20572px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26903i158310E0557C41FC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22nonName.PNG%22%20title%3D%22nonName.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3BThe%20above%20happened%20in%20an%20SharePoint%202016%20site.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAm%20I%20missing%20something%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20then%20tried%20using%20a%20Publishing%20site%20collection%20in%20Office%20365%20and%20the%20name%20of%20the%20Theme%20is%20now%20set%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20585px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26904i76DDAD08BE2E3D41%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Named.PNG%22%20title%3D%22Named.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20looks%20like%20a%20bug%20to%20me%20where%20the%20name%20of%20the%20theme%20isn't%20always%20set.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-145411%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-145439%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20templates%20lose%20colours%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-145439%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20look%20at%20the%20composed%20looks%20in%20Office%20365%20the%20Current%20composed%20look%20seems%20to%20be%20%3CSTRONG%3Elinked%3C%2FSTRONG%3Eto%20the%20selected%20composed%20look.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26909i9C022F42D449E4B0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Current2016.PNG%22%20title%3D%22Current2016.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWithin%20SharePoint%202016%20it%20looks%20like%20the%20Current%20composed%20look%20is%20a%20copy%20of%20the%20composed%20look%20with%20its%20own%20.spcolor%20file%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26908i140BA3526A581E67%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22CurrentOnPremises.PNG%22%20title%3D%22CurrentOnPremises.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3BThis%20now%20means%20that%20the%20code%20in%20PnP%20cannot%20find%20what%20the%20source%20of%20the%20Current%20composed%20look%20is.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Pieter Veenstra
MVP

With the latest releases of PnP PowerShell I've tried exporting sites ( Get-PnPProvisioningTemplate) and then apply the template to another site Get-PnPProvisioningTemplate.  When I do this I noticed that the colours configured within "Site Settings - > Change the look" are being ignored.

 

I'm quite sure in the past the .spcolor files were exported with the templates.

 

When I look in the template file I see: 

 

<pnp:ComposedLook Name="" ColorFile="" FontFile="" BackgroundFile="" Version="0" />

It looks like the Composed Look is being ignored.

 

When I ran this through the debugger I found that the theme doesn't have a name

 

nonName.PNG

 

 The above happened in an SharePoint 2016 site.

 

Am I missing something?

 

I then tried using a Publishing site collection in Office 365 and the name of the Theme is now set:

Named.PNG

 

This looks like a bug to me where the name of the theme isn't always set. 

 

 

 

1 Reply
Solution

When I look at the composed looks in Office 365 the Current composed look seems to be linked to the selected composed look.

 

Current2016.PNG

 

Within SharePoint 2016 it looks like the Current composed look is a copy of the composed look with its own .spcolor file:

 

CurrentOnPremises.PNG

 This now means that the code in PnP cannot find what the source of the Current composed look is.