Live Theme - form.errors not appearing on Customer form submission

camb
Tourist
6 0 5

Howdy all!

I have a client site I've been working on, and am using the following code block on the registration form:

 

 

  {% if form.errors %}
    <div class="w-full lg:px-3">
      <div class="errors lg:py-1 xs:mb-0 lg:mb-0">
        <ul class="font-normal">
          {% for field in form.errors %}
            <li>
              {% if form.errors.messages[field] contains 'associated' %}
                This email address is already associated with an account. If this account is yours, please try <a href="/account/login#recover" class="underline">resetting your password</a>. Or <a href="/account/login" class="underline">Sign In</a>
              {% else %}
                {{ form.errors.messages[field] }}
              {% endif %}
            </li>
          {% endfor %}
        </ul>
      </div>
    </div>
  {% else %}
    <input type="hidden" name="return_to" value="/account" />
  {% endif %}



Use case:
A customer is in the system (either from a previous purchase, migration, or simply manual creation by the site admin), but has no account. They go through the "Registration" flow to create an account, using an email that is already logged in Shopify.

Expected behavior: User is shown a message (which is technically an "error" in Liquid) that essentially says "Account exists. Check your email for an activation code". 

Actual behavior: User is directed to the /account page using our "return_to" input that is only rendered in the Liquid in the absence of form errors.

In other words, it seems like form.errors is not being rendered properly on the live site.

 

Live Theme (post-submission)

Redirects me to the /account page with no messaging/errors output.

Dev Theme (post-submission) (running locally)

1201267367894796.dK5V50pkpUvTiq5SUOG8_height640.png

 

Thanks for any insight here! I figured this might be Shopify server related.

Best,
Cam

Replies 0 (0)