# Unknown method called on Cake\\ORM\\Table - CakePHP 4

**URL:** <https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129>\
**Category:** Need Help\
**Created:** [January 19, 2020, 6:17pm UTC](https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129 "2020-01-19T18:17:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ironinthesoul](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/ironinthesoul/32/1653_2.png) [@ironinthesoul](https://discourse.cakephp.org/u/ironinthesoul)\
**Post date:** [January 19, 2020, 6:17pm UTC](https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129/1 "2020-01-19T18:17:33Z")

</div>

Hi,

I’ve been developing with CakePHP 2 for years and recently jumped to 4, and it’s a big change. But, got my app working nicely locally and deployed it to a testing server. Locally I’m on a Mac running XAMPP without any issues. The deployment server is Fedora 31 running PHP 7.3. Everything seems set up correctly, I’ve tested the database connection too.

But, when I load my site, I get the following error:

# Unknown method “parameters” called on Cake\ORM\Table

But it works fine locally. I’ve checked everything. Re-run composer on the deployment server. Checked requirements.The files are synced with Git. But, I cannot figure out why I’m getting this error.

The file referenced in the error looks like this:

AppController.php

namespace App\Controller;  
use Cake\Controller\Controller;  
use Cake\ORM\TableRegistry;  
use Cake\Core\Configure;  
use App\Application;

```
class AppController extends Controller {
    public function initialize(): void {
        parent::initialize();

		$this->App = new Application(dirname(dirname( __DIR__ )) . '/config');
		$this->requester = $this->App->requester();
...
        $this->loadComponent('RequestHandler');
        $this->loadComponent('Flash');

	$this->Babel = TableRegistry::getTableLocator()->get('babel');
	$this->Brands = TableRegistry::getTableLocator()->get('brands');
	$this->Collections = TableRegistry::getTableLocator()->get('collections');
...
	$this->Odin = TableRegistry::getTableLocator()->get('odin');
	

		$requestparams = $this->request->getAttribute('params');

		$this->params = $this->Odin->parameters($requestparams);
...

```

 ![Screen-Shot-2020-01-19-at-19.49.35](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/a/a7d7872284182b763c1024b40e41e2db55543ca9.png)

I’d really appreciate it if someone could help me figure out why I get this error on one server but not the other. Am I missing something in the set up that isn’t synced over Git? Is there a file I need to manually add to the server? I feel if this was the case it would just crash.

Anyway, all help gratefully received.

Thanks,

Michael

---

<div class="post-metadata">

**Author:** ![ironinthesoul](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/ironinthesoul/32/1653_2.png) [@ironinthesoul](https://discourse.cakephp.org/u/ironinthesoul)\
**Post date:** [January 19, 2020, 6:33pm UTC](https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129/2 "2020-01-19T18:33:00Z")

</div>

FYI, the parameters() method is part of a Parameters Behavior which is loaded in the OdinTable.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [January 19, 2020, 7:40pm UTC](https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129/3 "2020-01-19T19:40:32Z")

</div>

Check the type of `$this->Odin`. I’m betting it’s a generic Cake table object, not your specific class. That’ll most likely be because of case differences in the file system, if your dev system is Windows and live is Linux.

---

<div class="post-metadata">

**Author:** ![ironinthesoul](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/ironinthesoul/32/1653_2.png) [@ironinthesoul](https://discourse.cakephp.org/u/ironinthesoul)\
**Post date:** [January 20, 2020, 4:51am UTC](https://discourse.cakephp.org/t/unknown-method-called-on-cake-orm-table-cakephp-4/7129/4 "2020-01-20T04:51:05Z")

</div>

Genius! Didn’t even consider case differences.

From local Mac:

```
object(App\Model\Table\OdinTable) {

	'registryAlias' => 'odin',
	'table' => 'odin',
	'alias' => 'odin',
	'entityClass' => 'App\Model\Entity\Odin',
	'associations' => [],
	'behaviors' => [
		(int) 0 => 'Parameters',
		(int) 1 => 'Arraysearch',
		(int) 2 => 'File'
	],
	'defaultConnection' => 'default',
	'connectionName' => 'default'

}

```

From Fedora server:

```
object(Cake\ORM\Table) {

	'registryAlias' => 'odin',
	'table' => 'odin',
	'alias' => 'odin',
	'entityClass' => 'Cake\ORM\Entity',
	'associations' => [],
	'behaviors' => [],
	'defaultConnection' => 'default',
	'connectionName' => 'default'

}

```

After sorting out the cases on all the classes I pinpointed the error:

-\>getTableLocator()-\>get(‘odin’);

should be

-\>getTableLocator()-\>get(‘Odin’);

Odd thig is when I first used the table locator I copied and pasted the method from the CakePHP Cookbook!

Thanks so much for your help, I really appreciate it.

Kind regards,

Michael
