Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I code a login page in shopify use Liquid.
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.
Solved! Go to the solution
This is an accepted solution.
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.
This is an accepted solution.
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.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025