Skip to content

Commit

Permalink
- Updated PageReference to try and get breadCrumbs for blocks with Pa…
Browse files Browse the repository at this point in the history
…ths. This fixes the issue of an exception being logged on every page load when the parent Page contains Obsidian block(s).
  • Loading branch information
Kwame-Agyei committed Apr 14, 2023
1 parent f288044 commit 28942d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Rock/Web/PageReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ public static List<PageReference> GetParentPageReferences( RockPage rockPage, Pa
parentPageReference.BreadCrumbs.Add( new BreadCrumb( bcName, parentPageReference.BuildUrl() ) );
}

foreach ( var block in page.Blocks.Where( b => b.BlockLocation == Model.BlockLocation.Page ) )
foreach ( var block in page.Blocks.Where( b => b.BlockLocation == Model.BlockLocation.Page && b.BlockType.Path.IsNotNullOrWhiteSpace() ) )
{
try
{
Expand Down

0 comments on commit 28942d5

Please sign in to comment.