Open 3PSY0N opened 2 years ago
Hello, i checked and i have the same problem but after refresh the page, boolean have the good value.
PHP 8.1.3 Symfony 5.4.4 EasyAdmin 4.0.7
I found the problem, because i overrided function edit and fix return (with KeyValueStore) since deprecation.
Ajax response :
App\Controller\Admin\Crud\AdminCrudController::edit(): Return value must be of type EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore, Symfony\Component\HttpFoundation\Response returned
I added Response on return
public function edit(AdminContext $context): KeyValueStore|Response
If it's not working for you, look the ajax response in the browser console.
I found the problem, because i overrided function edit and fix return (with KeyValueStore) since deprecation.
Ajax response :
App\Controller\Admin\Crud\AdminCrudController::edit(): Return value must be of type EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore, Symfony\Component\HttpFoundation\Response returned
I added Response on return
public function edit(AdminContext $context): KeyValueStore|Response
If it's not working for you, look the ajax response in the browser console.
Hi thank you for reply!
Nope, still not working, i still have the error in console and PATCH failed. it's weird because it's working on local server (WSL app launched with symfony server:start) and not on prod server.
I precise, it fail only in Index view. not in the Edit view.
Thanks
And no ajax call in the Network console ?
Nope, the PATCH request send no response =/
It's a new install or the problem appears after an update ?
It's an update, i started my project with EA 3. But i don't understand why in local server i have no error (v4.0.9) and in production i have this error (v4.0.9) too. All my project is up to date in local/prod. so i don't understand where is the issue.
Same problem here.
There is further information here but not sure on how to diagnose issue with toggle switch:
https://stackoverflow.com/questions/58215104/whats-the-neterr-http2-protocol-error-about
Here is my console output:
I guess the "classList" error is a consequence of the net::ERR_HTTP2_PROTOCOL_ERROR
error.
Same issue here, has anyone solved the problem ?
Hello, I have a problem with my application in production. When I want to click on the boolean toggle on the crud controller index, an ajax request (PATCH) is supposed to be sent. But I have an error, the button becomes gray, nothing sent in DB, and the JS have an error.
in the crud controller i have
In the browser console i have this error
This error happens only in production, locally everything works as expected.
What i'm supposed to do? Thank you