@@ -46,13 +46,7 @@ public override ProvisioningTemplate ExtractObjects(Web web, ProvisioningTemplat
46
46
var chrome = pnpCoreContext . Web . GetBrandingManager ( ) . GetChromeOptions ( ) ;
47
47
48
48
footer . Enabled = chrome . Footer . Enabled ;
49
- // Avoid setting a null DisplayName, which causes errors if the footer was previously enabled.
50
- // This can happen when a user disables the footer after it was set.
51
- // Only update if DisplayName is present in the template.
52
- if ( template . Footer . DisplayName != null )
53
- {
54
- chrome . Footer . DisplayName = template . Footer . DisplayName ;
55
- }
49
+ footer . DisplayName = chrome . Footer . DisplayName ;
56
50
footer . Layout = ( PnP . Framework . Provisioning . Model . SiteFooterLayout ) Enum . Parse ( typeof ( PnP . Framework . Provisioning . Model . SiteFooterLayout ) , chrome . Footer . Layout . ToString ( ) ) ;
57
51
footer . BackgroundEmphasis = ( PnP . Framework . Provisioning . Model . Emphasis ) Enum . Parse ( typeof ( PnP . Framework . Provisioning . Model . Emphasis ) , chrome . Footer . Emphasis . ToString ( ) ) ;
58
52
}
@@ -375,7 +369,13 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ
375
369
var chrome = pnpCoreContext . Web . GetBrandingManager ( ) . GetChromeOptions ( ) ;
376
370
377
371
chrome . Footer . Enabled = web . FooterEnabled ;
378
- chrome . Footer . DisplayName = template . Footer . DisplayName ;
372
+ // Avoid setting a null DisplayName, which causes errors if the footer was previously enabled.
373
+ // This can happen when a user disables the footer after it was set.
374
+ // Only update if DisplayName is present in the template.
375
+ if ( template . Footer ? . DisplayName != null )
376
+ {
377
+ chrome . Footer . DisplayName = template . Footer . DisplayName ;
378
+ }
379
379
chrome . Footer . Layout = ( PnP . Core . Model . SharePoint . FooterLayoutType ) Enum . Parse ( typeof ( PnP . Core . Model . SharePoint . FooterLayoutType ) , template . Footer . Layout . ToString ( ) ) ;
380
380
chrome . Footer . Emphasis = ( PnP . Core . Model . SharePoint . FooterVariantThemeType ) Enum . Parse ( typeof ( PnP . Core . Model . SharePoint . FooterVariantThemeType ) , template . Footer . BackgroundEmphasis . ToString ( ) ) ;
381
381
0 commit comments