v7.0.0-beta.3 throws Response has no matching <turbo-frame> on console
See original GitHub issueI had a working sample that stopped after this v7.0.0-beta.3
release. I’m using the latest over CDN so I noticed.
If I change back to any prior v7.0.0-beta
version my code works. On the v7.0.0-beta.3
I get:
Response has no matching <turbo-frame id="beverages_list"> element turbo.js:740:13
extractForeignFrameElement https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:740
loadResponse https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:641
formSubmissionSucceededWithResponse https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:700
requestSucceededWithResponse https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:483
receive https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:351
perform https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:337
start https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:445
formSubmissionIntercepted https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:669
submitBubbled https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:538
(Async: EventListener.handleEvent)
start https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:546
connect https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:606
connectedCallback https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:55
<anonymous> https://cdn.skypack.dev/-/@hotwired/turbo@v7.0.0-beta.3-tvFsO8IW4m2YjmlcLZZq/dist=es2020/@hotwired/turbo.js:931
I’m not sure if I’m doing something wrong (I followed https://turbo.hotwire.dev/handbook/streams) that I didn’t notice but I wanted to report early on.
My page looks like this:
<!-- omitted irrelevant stuff -->
<section>
<h1>Showcase how to add to part of a page</h1>
<turbo-frame id="beverages_list">
<form action="/beverages/any" method="post">
<button type="submit">Add beverage</button>
</form>
<div id="beverage_1"><p>1 - Coffee</p></div>
</turbo-frame>
</section>
And my server response to the POST method is:
<!-- omitted irrelevant stuff -->
<body>
<h1>A Beverage (page or Turbo component)</h1>
<turbo-stream action="append" target="beverages_list">
<template>
<div id="beverage_8">
<p>
<span>8</span> - <span>Coffee</span>
</p>
</div>
</template>
</turbo-stream>
</body>
_Originally posted by @brunodrugowick in https://github.com/hotwired/turbo/issues/31#issuecomment-761569577_
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Response has no matching <turbo-frame id=...> element ...
I'm receiving the following error message: Response has no matching <turbo-frame id="experiments"> element . However, the response is not ...
Read more >How to deal with 500 in the frame? - Hotwire Discussion
I have a <turbo-frame> and when I submit form it gets replaced. ... writes ts to console: Response has no matching <turbo-frame id="some-frame">...
Read more >Turbo Frames on Rails - Colby.so
What's a matching Turbo Frame tag? Let's look at that next. Responding with frame content. The power of Turbo Frames is in replacing...
Read more >Turbo Frames and Turbo Stream templates - Hotrails
The frame disappears from the page, and there is an error in the console: Response has no matching <turbo-frame id="first_turbo_frame"> ...
Read more >Hotwired ASP.NET Core Web Application — Part 3 - Medium
If you want to follow along with the tutorial, you can download the current ... The error when the response has no matching...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@seb-jean and others having the same issue, this may help you.
I fixed my problem investigating and debugging another project.
But the “solution” is also stated on the documentation here. This was changed on this commit from Jan 18. And is mentioned on the beta-3 changelog on Jan 12.
I basically changed my content-type from
text/html; turbo-stream
totext/vnd.turbo-stream.html
on my view resolver, which is required onv7.0.0-beta.3+
:And everything works fine now.
Thanks! And remember, folks: RTFM. <-- also a note for myself 😆
I have the same issue :
Response has no matching <turbo-frame id="my_stuff"> element