nicolaayan / EpiserverCmsAudit

MIT License
9 stars 20 forks source link

If star (*) is missing in hostnames and content has a language which is not set up or deleted the list failes #13

Closed oyvindwh closed 4 years ago

oyvindwh commented 4 years ago

In the function GetContentItemsOfTypes this line will fail if the * is missing in hostnames and the content can not get the current sitedefinition.

_siteDefinitionResolver.GetByContent(cmu, true)**.id ** will throw an exception.

Perhaps update the documentation or have a fallback guid if GetByContent returns null?

nicolaayan commented 4 years ago

Hi @oyvindwh I've recently fixed this in v1.4.1. It was failing for pages that didn't belong to any Site Definition (i.e. floating pages) as you've pointed out. Have added a fallback empty GUID for those. Thanks