OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Lazy field loading using content item ContentManager instead of the injected one. #8725

Closed AndreaPiovanelli closed 8 months ago

AndreaPiovanelli commented 9 months ago

In refernce to issue #8724 , now lazy fields are loaded using the content item ContentManager (passed as a parameter to the Loading function inside the LoadContentContext. This avoids losing the database session when reading LazyFields. The same patch has been applied to both ContentPickerFieldHandler and MediaLibraryPickerFieldHandler, because both were using the injected content manager when reading lazy fields.