rreimche Posted June 17 Share Posted June 17 (edited) This is a part of a bigger problem, as I have found out here. ----------------------------- Hi, I am making a grid in prestashop 8 using this guide. The form is generally working, but the reset button is not. As the tutorial says, I have added this filter to my grid definition: ->add((new Filter('actions', SearchAndResetType::class)) ->setAssociatedColumn('actions') ->setTypeOptions([ 'reset_route' => 'admin_common_reset_search_by_filter_id', 'reset_route_params' => [ 'filterId' => self::GRID_ID, ], 'redirect_route' => 'admin_pwswkbl_list', ]) ) As far as I understand, I don't need to define the specified route myself. This is what Prestashop generates to show the button: <div class="js-grid-reset-button"> <button type="reset" name="course_list[actions][reset]" class="btn btn-link js-reset-search btn d-block grid-reset-button" data-url="/admin-dev/index.php/common/reset_search/course_list?_token=ooPhgOvN8rhNQEQ7UPu68Q_3LiTRpD581hVS4Y4AGe8" data-redirect="/admin-dev/index.php/modules/kursanmeldungen?_token=ooPhgOvN8rhNQEQ7UPu68Q_3LiTRpD581hVS4Y4AGe8"><i class="material-icons">clear</i> Reset </button> </div> The reset button is just not working in any sense -- when I click it, nothing happens. I've already rechecked everything I could, asked LLMs and searched the web. I also see no javascript errors. And when I open the URL given in data-url attribute of the button I get Quote Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /common/reset_search/course_list": Method Not Allowed (Allow: POST) So it seems that the route is there, but only for POST. I'd be grateful for any help. Thank you in advance. Edited June 18 by rreimche (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now