Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I try to submit a comment on a node, hide_submit module doesn't work. It is not hiding the submit button. But when I try to submit an empty comment, since comment field is required, it gives me an error and if then I enter a comment and try to submit , it works. I tried debugging the issue, and this is happening because comment form is lazyloaded through bigpipe module and the response of AJAX request is FORM itself. So, in Drupal behavior it is not able to find form in context.
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff_10-13.txt | 12.6 KB | nikitaaswani |
#10 | lazyload_issue-3085453-10.patch | 13.36 KB | nikitaaswani |
#4 | lazyload_issue-3085453.patch | 7.87 KB | nikitaaswani |
Screen Shot 2019-10-03 at 4.45.50 PM.png | 146.84 KB | nikitaaswani |
Comments
Comment #2
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedComment #3
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedComment #4
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedSince sometimes the response of AJAX is form itself, instead of finding form in context, checked if context has tag form or document. Attaching patch to resolve the issue.
Comment #5
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedComment #6
ambuj_gupta CreditAttribution: ambuj_gupta at QED42 commentedComment #7
ambuj_gupta CreditAttribution: ambuj_gupta at QED42 commentedTested and verified the module after adding the patch created by @nikitaaswani. And it is working as expected.
Comment #8
ambuj_gupta CreditAttribution: ambuj_gupta at QED42 commentedComment #9
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedWill be fixing the linting issues in the patch.
Comment #10
nikitaaswani CreditAttribution: nikitaaswani as a volunteer and at QED42 commentedFixed the linting issues in the last patch.
Comment #11
nehajyoti CreditAttribution: nehajyoti as a volunteer and at QED42 commented@nikita,
------------------------
Committing the patch - lazyload_issue-3085453-10.patch to 8.x branch. ( Note: Have release alpha3 release just before applying this patch).
Comment #13
nehajyoti CreditAttribution: nehajyoti as a volunteer and at QED42 commented