PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 20, 2022

[FIXED] Cell class is missing

 January 20, 2022     cakephp, cakephp-3.0, php     No comments   

Issue

Error:

Cell class Audit.AuditCell is missing. Cake\View\Exception\MissingCellException

Plugin files:

plugins/Audit/src/Template/Cell/Audit/model.ctp
plugins/Audit/src/View/Cell/AuditCell.php

In, src/Template/Servers/view.ctp:

echo $this->cell('Audit.Audit::model', [strtolower($this->request->controller), $this->request->pass[0]]);

In, config/bootstrap.php:

Plugin::load('Audit', ['bootstrap' => true, 'routes' => true]);

Using CakePHP 3.3.16.

Edit #1

Snapshot of my IDE:

enter image description here

Edit #2

Relevant parts of my composer.json

"require": {
    "php": ">=5.5.9",
    "cakephp/cakephp": "3.3.*",
    "mobiledetect/mobiledetectlib": "2.*",
    "cakephp/migrations": "~1.0",
    "cakephp/plugin-installer": "*",
    "adayth/cakephp-cipher-behavior": "^1.0"
},
"autoload": {
    "psr-4": {
        "App\\": "src",
        "Audit\\": "./plugins/Audit/src"
    }
},
"autoload-dev": {
    "psr-4": {
        "App\\Test\\": "tests",
        "Cake\\Test\\": "./vendor/cakephp/cakephp/tests",
        "Audit\\Test\\": "./plugins/Audit/tests"
    }

Solution

I added the proper namespace Audit\View\Cell to my file.



Answered By - TechFanDan
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing