79498460

Date: 2025-03-10 15:32:53
Score: 2.5
Natty:
Report link

The issue had nothing to do with using htmx incorrectly, I'm posting this as an answer in case someone has this bizzare issue as well.

There were 4 scripts sourced in the layout, among them htmx.js... Additionally, there was a small script sourced in the view from which the form is submitted. I use that to toggle a modal: <script src=~/js/modal.js" />.

Get this: This script prevented htmx.js (but not any of the other scripts) from loading. The fix? Changed it to <script src=~/js/modal.js"></script>

Since self-closing script tags are not allowed in html, everything up to the </script> of the htmx script was ignored. Somehow the modal.js script was completely intact and a bunch of missing closing tags for various divs and main were not an issue.

Reasons:
  • RegEx Blacklisted phrase (1.5): fix?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: dave