mautic / mautic

Mautic: Open Source Marketing Automation Software.
https://www.mautic.org
Other
7.4k stars 2.65k forks source link

Form (with autofill fields) displays "old contact values" after submitting new values #12918

Open multikoop opened 1 year ago

multikoop commented 1 year ago

Mautic Version

4.4.x series 5.0.0-rc1

PHP version

php:7.4-apache image

What browsers are you seeing the problem on?

Chrome

What happened?

Chrome: version 119 Mautic: version 4.4.10

When using a form with submit action "Remain at form" and configuring fields with autofill. Using the form inside a landing page and coming through a trackable Link inside an email, the autofill works, but when updating to a difference input value after submit the OLD value is displayed.

EXCEPTED BEHAVIOUR would be that of course the newly submitted value should be displayed.

From User perspective this looks like a bug. Also when submitting x times in a row. always the old value is visible. See Steps to reproduce for more information.

How can we reproduce this issue?

Step 1: Create a Standalone form with default Submit-Action "Remain at form"

image

Step 2: Define fields of type text for firstname with a binding to the corresponding contact field as follows

image image

Under "behaviour" make sure to enable "auto fill data"

image

-> Save and Close.

Step 3: Create a landing page (name it preferencepage), choose default template and add the form as {form=3}. (Make sure to reference the corresponding Form-ID) -> Now checkout the page (http://localhost:8082/preferencepage). it should look like

image

Step 4: Prepare an Email (Template; altghoug bug is also reproducible with segment emails) with a link to the landing page http://localhost:8082/preferencepage Save & Close

Step 4b: Prepare mailhog or mailpit or so and configure it in mautic settings to be able to quickly test email links. Make sure email links are beeing tracked.

Step 5: Prepare a contact (e.g. named Chris Example, chris@example.com) Now send an email

image

Make sure the link is inside the email

image

-> Email is received.

image

-> Hovering the Link I can notice the actual link is smt like http://localhost:8082/r/b565b66bbf915fb2c4d6d8620?ct=YTo0OntzOjY6InNvdXJjZSI7YTowOnt9czo1OiJlbWFpbCI7TjtzOjQ6InN0YXQiO3M6MjI6IjY1NWYzNzRjNTc3N2MxODE1NTk4NDgiO3M6NDoibGVhZCI7czoxOiI5Ijt9

Open it (in e.g. an incognito browser session)

image

(the Firstname is auto filled, as expected)

Step 6: Now update name to ChrisNew e.g.

image

Click on "Update data" -> Hhhm, the old value is displayed

image

-> Check in Mautic > Contacts. Yes, the name has changed as expected

image

-> refresh the Page http://localhost:8082/preferencepage in the browser. As Excepted the correct name is displayd

image

Relevant log output

No response

Code of Conduct

stale[bot] commented 8 months ago

This issue or PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like to keep it open please let us know by replying and confirming that this is still relevant to the latest version of Mautic and we will try to get to it as soon as we can. Thank you for your contributions.

multikoop commented 8 months ago

Any ideas / hints how to fix the issue?

RCheesley commented 4 months ago

Hi @multikoop and sorry for the delay in responding. From what I can see, the issue is that you're expecting the form to refresh once it's submitted to get the newly updated data, rather than just show what was there before. Is that a correct understanding?

RCheesley commented 4 months ago

cc @mautic/ux-ui-tiger-team for your review/thoughts.

andersonjeccel commented 4 months ago

@RCheesley Seems like a bug for devs regarding information retrieval from stored data or cache, UX/UI TT can't do anything here