-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v7.0.0-beta.3 throws Response has no matching <turbo-frame> on console #144
Comments
v7.0.0-beta.3
release. I'm using the latest over CDN so I noticed.
A sample of the problem I mentioned above: https://hotwire-v7b3-error.herokuapp.com/ |
Thank you for opening this issue @brunodrugowick. Does your response include a Is this a Rails application? What is the response content type that's rendering the HTML that contains the |
@brunodrugowick I believe you'd need to wrap your response in the same |
The error is valid. If you intend to replace the <turbo-frame id="beverages_list" target="_top"> |
Ok, I'll answer one by one.
No. I thought I was supposed to reference the target element on the
No. A Spring Boot (Java). Although this is Java + Thymeleaf (template rendering) specific, it may be worth mentioning that my app adds @Bean
public ThymeleafViewResolver viewResolver(SpringTemplateEngine templateEngine) {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setContentType("text/html; turbo-stream");
viewResolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
viewResolver.setOrder(0);
viewResolver.setViewNames(new String[] { "*stream*" });
viewResolver.setTemplateEngine(templateEngine);
return viewResolver;
}
|
That's not what I get from the documentation and, also, that's not what I get from any version before See: "Appends the content within the template tag to the container designated by the target dom id." |
That doesn't work. See the documentation. That's what I'm doing and, again, works on |
I don't know about |
I have the same issue :
|
@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 @Bean
public ThymeleafViewResolver viewResolver(SpringTemplateEngine templateEngine) {
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
viewResolver.setContentType("text/html; turbo-stream");
viewResolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
viewResolver.setOrder(0);
viewResolver.setViewNames(new String[] { "*stream*" });
viewResolver.setTemplateEngine(templateEngine);
return viewResolver;
} And everything works fine now. Thanks! And remember, folks: RTFM. <-- also a note for myself 😆 |
There was a breaking change on beta-3 that caused the issue. See hotwired/turbo#144 (comment)
I 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 thev7.0.0-beta.3
I get: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:
And my server response to the POST method is:
Originally posted by @brunodrugowick in #31 (comment)
The text was updated successfully, but these errors were encountered: