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

Form submit event triggering before content publish in Orchard.CustomForms causes issues when reading content items #8794

Closed AndreaPiovanelli closed 2 months ago

AndreaPiovanelli commented 4 months ago

https://github.com/OrchardCMS/Orchard/blob/86bcf413e703da88c21c5dbd329e76482fae7da4/src/Orchard.Web/Modules/Orchard.CustomForms/Controllers/ItemController.cs#L202

Since event triggering is made before the actual publishing of content items, the content passed in the event context (e.g. for workflows) isn't up to date. This causes, for example, some field values to be empty, making it impossible for the following workflow steps to actually use the content item.

AndreaPiovanelli commented 2 months ago

Closed issue since #8795 has been merged into dev.