-
Notifications
You must be signed in to change notification settings - Fork 494
Conversation
{% endcomment %} | ||
<div class="form-vertical"> | ||
<div id="comment-form" class="form-vertical"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this, as {% form 'new_comment', article %}
will dynamically generate a form with id="comment_form"
Update article comment form ids
Just a small detail :) It seems the hash that gets added is #comment_form not #comment-form |
Also in blog.liquid you need to update the Comments link (in the meta data) which has the old hash #Comments |
Good one, thanks so much! We'll fix that. We fixed |
Good catch, thanks @suture |
Maybe another problem. If you delete this, we no longer get a success message. {% if form.posted_successfully? %}
{% assign newHash = 'Comments' %}
{% endif %} |
Will be adding that in another PR shortly Edit: this may actually be a bug with the update in core, preventing |
Many thanks for following that up. |
A pending PR in Shopify (https://github.com/Shopify/shopify/pull/57450) will reload the page after a comment form submission with either
#comments
or#comment_form
as a hash in the URL.#comments
already works as expected on a successful post#comment_form
will be added when the form has errors, jumping the page down to the anchor on the form so the user can fix the mistakesThis PR removes the hacky JS that got around having accurate URL hashes and updates the IDs.
cc @Shopify/themes-team @mac-adam-chaieb
FYI @Shopify/theme-support, this can be a reference for updating other themes. Ping me with any questions.