Skip to content

Commit

Permalink
+ (CRM) Fixed a bug where the Documents block would sometimes show a …
Browse files Browse the repository at this point in the history
…configuration error message when there really was no configuration error. (Fixes SparkDevNetwork#5645)
  • Loading branch information
nairdo authored and briankalwat committed Dec 14, 2023
1 parent 8172b9d commit ecc683d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RockWeb/Blocks/Crm/Documents.ascx.cs
Expand Up @@ -181,9 +181,12 @@ private bool IsValidBlockSettings()
hasError = true;
}


// Ensure the page ContextEntity page parameter is configured.
var pageContextTypes = pageContextEntityTypes.Select( x => x.Name );
var requiredTypes = ContextTypesRequired.Select( x => x.Name );
if ( !pageContextEntityTypes.Any()
|| !pageContextEntityTypes.Where( p => ContextTypesRequired.Contains( p ) ).Any() )
|| !requiredTypes.All( item => pageContextTypes.Contains( item ) ) )
{
nbMessage.Text += "The page context entity has not been configured for this block. Go to Page Properties and click Advanced and enter a valid parameter name under 'Context Parameters'.<br/>";
hasError = true;
Expand Down

0 comments on commit ecc683d

Please sign in to comment.