cakePHP中视图和编辑视图的内部错误

cakePHP中视图和编辑视图的内部错误,cakephp,fullcalendar,Cakephp,Fullcalendar,我按照教程将完整日历添加到我的应用程序中。对于控制器事件类型、索引和添加视图,我没有问题 对于视图和编辑视图,我得到一个错误: 发生内部错误 错误:发生内部错误 我使用的是CakePHP2和PHP5.4 这是我的控制器: <?php class EventTypesController extends AppController { var $name = 'EventTypes'; var $paginate = array( 'li

我按照教程将完整日历添加到我的应用程序中。对于控制器事件类型、索引和添加视图,我没有问题

对于视图和编辑视图,我得到一个错误:

发生内部错误

错误:发生内部错误

我使用的是CakePHP2和PHP5.4

这是我的控制器:

<?php

class EventTypesController extends AppController {

    var $name = 'EventTypes';

        var $paginate = array(
            'limit' => 15
        );

    public function admin_index() {
        $this->EventType->recursive = 0;
        $this->set('eventTypes', $this->paginate());
    }

    public function admin_view($id = null) {
        if(!$id) {
            $this->Session->setFlash(__('Invalid event type', true));
            $this->redirect(array('action' => 'index'));
        }
        $this->set('eventType', $this->EventType->read(null, $id));
    }

    public function admin_add() {
        if (!empty($this->data)) {
            $this->EventType->create();
            if ($this->EventType->save($this->data)) {
                $this->Session->setFlash(__('The event type has been saved', true));
                $this->redirect(array('action' => 'index'));
            } else {
                $this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
            }
        }
    }

    public function admin_edit($id = null) {
        if (!$id && empty($this->data)) {
            $this->Session->setFlash(__('Invalid event type', true));
            $this->redirect(array('action' => 'index'));
        }
        if (!empty($this->data)) {
            if ($this->EventType->save($this->data)) {
                $this->Session->setFlash(__('The event type has been saved', true));
                $this->redirect(array('action' => 'index'));
            } else {
                $this->Session->setFlash(__('The event type could not be saved. Please, try again.', true));
            }
        }
        if (empty($this->data)) {
            $this->data = $this->EventType->read(null, $id);
        }
    }

    public function admin_delete($id = null) {
        if (!$id) {
            $this->Session->setFlash(__('Invalid id for event type', true));
            $this->redirect(array('action'=>'index'));
        }
        if ($this->EventType->delete($id)) {
            $this->Session->setFlash(__('Event type deleted', true));
            $this->redirect(array('action'=>'index'));
        }
        $this->Session->setFlash(__('Event type was not deleted', true));
        $this->redirect(array('action' => 'index'));
    }
}
?>

我的模型:

<?php
class EventType extends AppModel {
    var $name = 'EventType';
    var $displayField = 'name';
    var $validate = array(
        'name' => array(
            'notempty' => array(
                'rule' => array('notempty'),
            ),
        ),
    );

    var $hasMany = array(
        'Event' => array(
            'className' => 'FullCalendar.Event',
            'foreignKey' => 'event_type_id',
            'dependent' => false,
        )
    );

}
?>


启用调试模式。日志中的错误是什么?错误:应用程序试图从FullCalendar插件加载文件,我猜在我的模型中脚本调用插件,我不知道在哪里。我将编辑我的帖子并放置我的模型。我不希望有一个文件夹“plugin”。导致此错误的原因是,在你的
app/plugin
目录中,你应该有一个
FullCalendar
文件夹。要更正此问题,您应该将
FullCalendar
plugin文件夹放在
app/plugin
中,以便Cake能够找到它