-
Notifications
You must be signed in to change notification settings - Fork 328
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
turbo_frame_tag with src and invalid response causing redirect to src #404
Comments
This behavior was changed in hotwired/turbo#445. Now instead of logging |
@alexandreruban Thanks, I wasn't aware of that change. I think I see the rationale, but it's making development exponentially harder. Do you know of a way to get the old behavior back, at least in development? I'm using turbo frames to append slides on a carousel, but if a requested slide was invalid for whatever reason it redirects to the invalid URL, which turbo loads the two adjacent slides. And if one of those is invalid... well... For now I've added an event listener with preventDefault() so no more wild redirects, but no helpful error messages either. |
@cabgfx, At the bottom of my application.js I added this: addEventListener("turbo:frame-missing", (event) => {
event.preventDefault()
console.log("TURBO FRAME MISSING");
}) |
@duffyjp thank you! |
When a
turbo_frame_tag
has asrc:
attribute, if the response doesn't contain a matching turbo-frame id (or any turbo-frame) shouldn't I be getting theResponse has no matching <turbo-frame id="some-frame">
error in the console? Instead I'm redirected to whatever thesrc:
was.The text was updated successfully, but these errors were encountered: