Flash->success("OK???????"); HOWEVER when workin" /> Flash->success("OK???????"); HOWEVER when workin" /> Flash->success("OK???????"); HOWEVER when workin"/>

When working with a "default" db connection the following code works great:

    function index()
    {
        $this->Flash->success("OK???????");

HOWEVER when working with a db connection other than "default" (SecondaryPersons)... Things begin to die horribly:

    public function index()
    {
        $this->Flash->error("DOES NOT WORK!");

ERRORS: Notice: Notice (1024): Undefined property: SecondaryPersonsController::$Flash ...

I've traced both and found the following:

[default db]
    Application::bootstrap()
    AppController::initialize()
    SecondaryPersonsController::index()

[SecondaryPersons]
    Application::bootstrap()
    
    SecondaryPersonsController::index()

WHAT? There is no call to AppController::initialize() which is of course where all of the

loadComponent()
require_once() 

is located!

Is there some reason I would need to duplicate this code for the Secondary DBs in each controller?

0

There are 0 best solutions below