Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Form submit redirect results in "Content missing" #27

Open
chapterjason opened this issue Jun 7, 2024 · 1 comment
Open

Form submit redirect results in "Content missing" #27

chapterjason opened this issue Jun 7, 2024 · 1 comment

Comments

@chapterjason
Copy link

As I tried to use this project, I came across the issue that if I submit the form and everything is alright, it returns like this:

return $this->redirectToRoute('project_show', ['id' => $project->getId()]);

Which ends up in:
image

(Content missing was the form before submit)

A bit of research I found something about missing frame in the Turbo Handbook

But not sure how to solve it properly, my current workaround is to add this and a block into the base template.

{% block meta %}
    <meta name="turbo-visit-control" content="reload">
{% endblock %}
@dcramble
Copy link

I was having this issue as well. What I learned by testing is, I belive you need a matching turbo-frame around the content you want displayed on a successful form submission, that matches the ID of the turbo-frame your form is contained in.

When I did this, my content displayed as expected.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants