Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPrevalueMaps returns the same results for different prevalue sources when they are based on the same prevalue source type #990

Closed
jhenkes opened this issue Mar 10, 2023 · 1 comment

Comments

@jhenkes
Copy link

jhenkes commented Mar 10, 2023

Description

I have a form that contains two fields with different prevalue sources that are based on the same type (in my case SQL Database). Attached to this form is a "Send email with template (Razor)"-workflow. After submission, the Model.PrevalueMaps inside the template contains an entry for each field with a prevalue source. But the values of these entries are identical for each prevalue source with the same type (e.g. SQL Database), instead of what it actually should be. I've also tested it with the prevalue source type "Get values from textfile" which had the same problem, so it seems to be a general problem and not specific to a single type. It also appears to me, that the last field within the same prevalue source type is always the one whose values are chosen.

Steps to reproduce

  • Create 2 separate prevalue sources with the same type (e.g. get values from textfile) but different values
  • Create a form that contains two fields, each one connected to one of the prevalue sources
  • Add a "Send email with template (Razor)" workflow to the form
  • Add a breakpoint to the template and submit the form
  • Look up the value of Model.PrevalueMaps. Even though the 2 prevalue sources had different values, they are now identical for both fields.

Expected result

The correct prevalues for the different fields are fetched independent of the fact that they share the prevalue source type with another field.

Actual result

The prevalues of the last field are fetched and applied for every other field within the same prevalue source type

Specifics

Umbraco.Forms Version 11.0.0

@AndyButland
Copy link

Thanks for the report on this issue. I can replicate and see what we need to do to fix. We'll resolve this for the upcoming 10.3/11,1 releases, and backport the fix to 8 and 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants