Skip to content
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

[LiveComponent] Broken forms after #1218 #1452

Closed
akyoscommunication opened this issue Feb 2, 2024 · 2 comments
Closed

[LiveComponent] Broken forms after #1218 #1452

akyoscommunication opened this issue Feb 2, 2024 · 2 comments
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed

Comments

@akyoscommunication
Copy link

Using form in LiveComponent throws Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException after #1218

Throws error at LiveComponentSubscriber line 108:

if (!$request->isMethod('post')) {
throw new MethodNotAllowedHttpException(['POST']);
}

No change in code since last composer update, forms worked perfectly before. Didn't found yet why each form field change is sent using GET and not POST.

Capture d’écran 2024-02-02 à 14 43 16

Capture d’écran 2024-02-02 à 14 44 38

@weaverryan
Copy link
Member

Hey! If you're using Encore, have you done a yarn install --force or npm install --force? It may just be that your JS is still using the previous version, which sends GET requests.

@weaverryan weaverryan added the Bug Bug Fix label Feb 2, 2024
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Feb 2, 2024
@akyoscommunication
Copy link
Author

Oh yeah my bad, I didn't restart the watch process after install --force ...
Sorry for the mistake, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed
Projects
None yet
Development

No branches or pull requests

3 participants