Conversation
templates/article.liquid
Outdated
There was a problem hiding this comment.
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
#commentsor#comment_formas a hash in the URL.#commentsalready works as expected on a successful post#comment_formwill 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.