nebojsatomic / IDE21

Content Management System that helps you design your website from the administration panel. You can, with a few clicks, completely design your website directly in the CMS, AND/OR use TailwindCSS for the same purpose and greater control ( also inside CMS admin panel ).
https://ide21.com
MIT License
9 stars 1 forks source link

Add Menu & Add Category fails in laravel version #4

Closed nebojsatomic closed 3 years ago

nebojsatomic commented 3 years ago

add-menu-fails

Add menu and Add category fails bcs the response is giving html, and it is giving html probably bcs form validation fails in between zf and laravel, that is if ($this->_request->isPost() && $formAddMenu->isValid($_POST)) {

is never true and the response is always giving else {

add-menu-item, add-category-item and delete actions are working

nebojsatomic commented 3 years ago

The problem actually was a trailing slash in the ajax call which made it repeat itself, sending post values in the first request, and making an error in the second bcs there was no post vars present in the second

POST(absoluteUrl + "category/add-category/" GET(absoluteUrl + "category/add-category"

POST(absoluteUrl + "menu/add-menu/" GET(absoluteUrl + "menu/add-menu

Solved in vuejs branch here https://github.com/nebojsatomic/IDE21/commit/b422d502b0db57d3950ce37e77a9afbb36c7b87a and will be in main once merged