Problem: A Shopify login form using Liquid ({{ form.errors | default_errors }}) shows validation errors in a development store but returns null in production. Inspecting {{ form | json }} shows {“password_needed”: true, “errors”: null} even when credentials are missing; same behavior observed on the Dawn theme.
Root cause identified: Enabling “Sign-in with Shop” (Shop Pay login) changes the flow. It injects a field Login_with_shop[analytics_trace_id] and redirects authentication, returning to the login URL with analytics_trace_id and error query parameters instead of populating form.errors in Liquid.
Implications: With Sign-in with Shop enabled—especially if the user previously used Shop Pay—server-side errors may not appear in form.errors. Error handling might need to read URL query parameters or integrate with Shop Pay’s login flow.
Workarounds/options:
Disable Sign-in with Shop (works but not ideal).
Implement proper handling for Shop Pay/Sign-in with Shop in the login flow (details pending).
Status: Cause identified; partial workaround available. The OP requests documentation or confirmation of the exact behavior and best-practice integration; discussion remains open.
To display error, I use {{ form.errors | default_errors }}
However, when I login without username and password, It just display error in development store. And in the production store, it’s alway null. I test in Dawn theme, the same situation happen.
When I use {{ form | json**}}** to watch variable in detail, It’s alway show {“password_needed”:true,“errors”:null} when I login without username and password.
I don’t really understand what happen behind the sense.
Anyone meet this case and know solution, please share with me. Thank you in advance.
I’ve figured reason out. It’s because I turn on Sign-in with Shop (Shop pay). It’s will add a field in my login form which is Login_with_shop[analytics_trace_id] and redirect to login url with analytics_trace_id and error queries.
I guess if I login by Shop pay before and enable Sign-in with Shop, it will redirect me to url with query include error instead of liquid return error in variable.
And the solution:
turn-off sign-in with shop (shouldn’t but it work)
interact login function with shop pay (harder - now I have know idea how to do it)
Some guesses from me. If anyone know exactly the reason or document relate to that, please let me know. Thank you a lot.