ProLoser/BakingPlate — Issue #16: Console problem - "Plugin BakingPlate could not be found."
Author: sc0ttyd
Created: 2011-12-15 18:34:39+00:00
State: open

Hi Guys, I'm having a bit of an issue integrating BakingPlate with my new workflow. I want to have CakePHP itself as a submodule within my project for ease of updates. I'm using CakePHP 2.0. So, I created a blank directory, ran `git init` from inside it, then added cakephp as a submodule in a folder called cakephp in the root of my project. I then copied app/, index.php, plugins/, .htaccess, and vendors/ from cakephp to the project root so that I can leave the cakephp folder alone. I edited /index.php and app/webroot/index.php so that CAKE_CORE_INCLUDE_PATH points to `ROOT . DS . 'cakephp' . DS . 'lib'`.

So far, so good - with apache's DocumentRoot pointed at the project root, cake's default home displays ok.

Now my problem comes when I try to integrate BakingPlate with this. I want to add BP as a git submodule as well - again for ease of upgrade, deployment, etc. I tried adding BP as a submodule using `git submodule add git://github.com/sams/BakingPlate.git plugins/baking_plate`. By cd'ing into /app and executing `../cakephp/lib/Cake/Console/cake`, the cake shell worked, but plate did not show as an available shell. I tried adding symbolic links in /app/Console/Command to /plugins/baking_plate/Console/Command/PlateShell.php and in /app/Console/Templates to the folders in /plugins/baking_plate/Console/Templates. This resulted in plate showing up in the list of available shells from the cake console, and cake plate now shows the cake plate subcommands correctly. But if I try cake plate bake or cake plate browse, I get the following errors:

```
Error: Plugin BakingPlate could not be found.
#0 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Core/App.php(332): CakePlugin::path('BakingPlate')
#1 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Configure/PhpReader.php(71): App::pluginPath('BakingPlate')
#2 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Core/Configure.php(309): PhpReader->read('BakingPlate.sub...')
#3 /Users/Liquid/workspace/cashback_us/app/Plugin/BakingPlate/Console/Command/PlateShell.php(101): Configure::load('BakingPlate.sub...')
#4 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/Shell.php(199): PlateShell->_welcome()
#5 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/Shell.php(370): Shell->startup()
#6 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/ShellDispatcher.php(177): Shell->runCommand('browse', Array)
#7 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 /Users/Liquid/workspace/cashback_us/cakephp/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#9 {main}
```
I have tried having baking plate as a submodule in /plugins/BakingPlate, /app/Plugin/BakingPlate, and /app/Plugin/baking_plate, but all result in the same error.

Thanks, Scotty