@@ -46,13 +46,7 @@ public override ProvisioningTemplate ExtractObjects(Web web, ProvisioningTemplat
4646 var chrome = pnpCoreContext . Web . GetBrandingManager ( ) . GetChromeOptions ( ) ;
4747
4848 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 ;
5650 footer . Layout = ( PnP . Framework . Provisioning . Model . SiteFooterLayout ) Enum . Parse ( typeof ( PnP . Framework . Provisioning . Model . SiteFooterLayout ) , chrome . Footer . Layout . ToString ( ) ) ;
5751 footer . BackgroundEmphasis = ( PnP . Framework . Provisioning . Model . Emphasis ) Enum . Parse ( typeof ( PnP . Framework . Provisioning . Model . Emphasis ) , chrome . Footer . Emphasis . ToString ( ) ) ;
5852 }
@@ -375,7 +369,13 @@ public override TokenParser ProvisionObjects(Web web, ProvisioningTemplate templ
375369 var chrome = pnpCoreContext . Web . GetBrandingManager ( ) . GetChromeOptions ( ) ;
376370
377371 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+ }
379379 chrome . Footer . Layout = ( PnP . Core . Model . SharePoint . FooterLayoutType ) Enum . Parse ( typeof ( PnP . Core . Model . SharePoint . FooterLayoutType ) , template . Footer . Layout . ToString ( ) ) ;
380380 chrome . Footer . Emphasis = ( PnP . Core . Model . SharePoint . FooterVariantThemeType ) Enum . Parse ( typeof ( PnP . Core . Model . SharePoint . FooterVariantThemeType ) , template . Footer . BackgroundEmphasis . ToString ( ) ) ;
381381
0 commit comments