Only get definitions of provided contained types #13891
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13890
Not really an issue but after seeing the last meeting I took a look at #13768 where in
ContainedPartDisplayDriver
we changed this.By that.
Maybe not so important but before we were calling
GetTypeDefinition()
only for the provided types, but now we callListTypeDefinitions()
that callsGetTypeDefinition()
for all existing content types.I also noticed that
GetTypeDefinition()
is case insentive which is no longer the case with.Contains(x.Name)
. Note: the var namex
of the delegate could also be changed.Reading at Missing content definition in a ListPartSettings throws an exception #13767 it was to fix an NRE when
GetTypeDefinition()
return null definitions, and that was fixed by retrieving all existing types in place of one by one with possible null definitions.So here we only get the definitions of the provided types as before, but with a new null check.
Edited: Just tried, if the definition of a contained type is removed it still throws an NRE with a null definition when checking for dynamic content type permissions, even if I keep the existing code, so looks like that #13767 was not fixed, and to be able to edit the item having the list part we need to specify a contained type of an existing type, will see tomorrow.