Skip to content

Conversation

daFish
Copy link
Contributor

@daFish daFish commented Oct 9, 2024

Q A
Bug fix? yes
New feature? no
Issues Fix #2177
License MIT

This is an attempt to fix #2177 as now there is a session and a request.

@carsonbot carsonbot added Bug Bug Fix LiveComponent Status: Needs Review Needs to be reviewed labels Oct 9, 2024
@smnandre
Copy link
Member

What i am not sure here is that tests are working in a lot of scenarios... i really would like to understand what is specific in your use case :|

@daFish
Copy link
Contributor Author

daFish commented Oct 11, 2024

I'm also still trying to understand the real cause. Looking at the current tests I get the impression, that they might not reflect a real world use case. But I might totally be wrong.

@smnandre
Copy link
Member

My point is, if this is (as i kinda suppose) related to CSRF and security.. this may be fixed soon

See: #2251

@daFish
Copy link
Contributor Author

daFish commented Oct 11, 2024

👍🏻 I'm looking forward to #2251 being merged.

@mkrauser
Copy link

I've explained everything in #2177 (comment)

That PR would help when testing Components with Form using the ComponentWithFormTrait

@mkrauser
Copy link

I've tested this PR some more. It seems to only fix one issue. When I try to submit the form, the CSRF-Token is invalid.
It seems, that a new Session is created for the Submit-Request. The one generated in this PR is not used.

@daFish
Copy link
Contributor Author

daFish commented Oct 22, 2024

My point is, if this is (as i kinda suppose) related to CSRF and security.. this may be fixed soon

See: #2251

After testing #2251 and disabling CSRF on my form, I can confirm this solves my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LiveComponent] Testing forms causes exeption "There is currently no session available."

4 participants