Closed nebojsatomic closed 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
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