You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The custom receipt is loaded via layout sets today, and requires that a data type has been set. It then loads the full <FormProvider> which loads that data model. When using custom receipt together with autoDeleteOnProcessEnd: true we cannot show that custom receipt (there is a warning about this that falls back to the default receipt in ProcessWrapper) after the referenced data type has been deleted (because loading <FormProvider> would crash when the default data model is missing).
After #1484 is done, it might be easier to run FormProvider without a single/default data model, if we're able to load multiple data models on demand/when used. This should also mean that we can then add support for loading a custom receipt _without any default data model definedinlayout-sets.json` - as long as no components or text resources reference the data model that has been deleted.
Added this to milestone for v5. We should support not specifying a default data type for a layout-set in general. What complicates this is that we currently use the dataType to find out which layout-set is the current one (for some weird reason). If an app is slightly misconfigured today, things can still work due to some quirks in the logic that I don't quite remember the details of 😅 In a new major release we don't have to worry about breaking such edge-cases and we can safely remove this connection between dataTypes and layout-sets, and not require a default data type at all. This is indeed easier to do after #1484.
Description
The custom receipt is loaded via layout sets today, and requires that a data type has been set. It then loads the full
<FormProvider>
which loads that data model. When using custom receipt together withautoDeleteOnProcessEnd: true
we cannot show that custom receipt (there is a warning about this that falls back to the default receipt in ProcessWrapper) after the referenced data type has been deleted (because loading<FormProvider>
would crash when the default data model is missing).After #1484 is done, it might be easier to run FormProvider without a single/default data model, if we're able to load multiple data models on demand/when used. This should also mean that we can then add support for loading a custom receipt _without any default data model defined
in
layout-sets.json` - as long as no components or text resources reference the data model that has been deleted.Additional Information
The text was updated successfully, but these errors were encountered: