@@ -736,16 +736,22 @@ public void UpdateDataTypesLocked(IEnumerable<int> dataTypeIds, Func<int, IPubli
736
736
{
737
737
EnsureLocked ( ) ;
738
738
739
- IPublishedContentType ? [ ] contentTypes = _contentTypesById
739
+ IPublishedContentType [ ] contentTypes = _contentTypesById
740
740
. Where ( kvp =>
741
741
kvp . Value . Value != null &&
742
742
kvp . Value . Value . PropertyTypes . Any ( p => dataTypeIds . Contains ( p . DataType . Id ) ) )
743
743
. Select ( kvp => kvp . Value . Value )
744
744
. Select ( x => getContentType ( x ! . Id ) )
745
- . Where ( x => x != null ) // poof, gone, very unlikely and probably an anomaly
745
+ . WhereNotNull ( ) // poof, gone, very unlikely and probably an anomaly
746
746
. ToArray ( ) ;
747
747
748
- var contentTypeIdsA = contentTypes . Select ( x => x ! . Id ) . ToArray ( ) ;
748
+ // all content types that are affected by this data type update must be updated
749
+ foreach ( IPublishedContentType contentType in contentTypes )
750
+ {
751
+ SetContentTypeLocked ( contentType ) ;
752
+ }
753
+
754
+ var contentTypeIdsA = contentTypes . Select ( x => x . Id ) . ToArray ( ) ;
749
755
var contentTypeNodes = new Dictionary < int , List < int > > ( ) ;
750
756
foreach ( var id in contentTypeIdsA )
751
757
{
@@ -761,7 +767,7 @@ public void UpdateDataTypesLocked(IEnumerable<int> dataTypeIds, Func<int, IPubli
761
767
}
762
768
}
763
769
764
- foreach ( IPublishedContentType contentType in contentTypes . WhereNotNull ( ) )
770
+ foreach ( IPublishedContentType contentType in contentTypes )
765
771
{
766
772
// again, weird situation
767
773
if ( contentTypeNodes . ContainsKey ( contentType . Id ) == false )
0 commit comments