FriendsOfCake / crud

Production-grade rapid controller development with built in love for API and Search

Home Page:https://crud.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing template

dasca opened this issue · comments

When using CakePHP 3.7.5 and following the Installation and Quick Start sections of the crud documentation with in it self needs some updating due to deprecated methods i.e:

Loading the plugin
Add the following to your /config/bootstrap.php

Plugin::load('Crud');

You don't get the expected results when doing GET request on actions and accepting application/json result.

I always end up with template file missing such as:
image

The plugin only requires 3.5 at the moment. Once the minimum framework version is pushed to 3.7 then the documentation can be updated.

I wonder if you have the RequestHandler setup correctly, as you should not need a template for a JSON request.

commented

Use the application class to load plugin if you are using newer cakephp version. How the plugin is loaded has nothing to do with your particular issue. Ensure you have loaded RequestHandler and setup ApiListener properly.