htmx
htmx copied to clipboard
alpine-morph swapError re().body is null
I get an error using hx-boost="true"
, hx-ext="alpine-morph"
, and hx-swap="morph"
.
I'm using htmx version 1.9.10
, alpinejs version 3.13.5
.
The requests do return a 200 OK result with valid HTML.
I did find #786 which seems related, but my error always happens no matter what speed I click around with.
I also encountered it. Errors disappeared in my case, when I replaced:
<body hx-ext="morph">
<!-- content -->
</body>
with
<body>
<div id="page" hx-ext="morph">
<!-- content -->
</div>
</body>
I did not yet dig, exactly why... but maybe just adding id
fixes it...
I got mine working again by changing hx-swap="morph"
to hx-swap="morph:innerHTML"
. Setting id
s didn't change anything for me.
Perhaps the alpine-morph
extension documentation should mention setting the above value when using it for boosting?