Wednesday, February 27, 2013

Re: Stuck with migration from 1.3 to 2.x / euromark plugin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Euromark!

> It seems you have not very much experience with Cake and how plugins work.
True on that ;) Just used them once before.


> So it might not be wise
> to try to work with my plugin. You will most likely run into quite a few
> other problems, as well.
> Better stick to the official plugin and migration guide as well as the
> documentation there:
> http://book.cakephp.org/2.0/en/console-and-shells/upgrade-shell.html
I started with that at first but ended up in errors in the generated
code I didn't get away. I also asked for help on that here, but it seems
I am the only person having that problem. Subject was: Migration problem
"PHP Fatal error: Class 'Inflector' not found"

>
> In case you still want to go ahead:
> yes, you would have to create such an APP/Plugin folder with the plugin
> inside it as APP/Plugin/Upgrade.
>
> So far you seem to be on the right track. Try to clear the cache - it might
> still have 1.3 paths cached etc.
I did that, too. Didn't help. Sorry....

I guess I will give it a final try in a few days and if that doesn't
work out I will stay with 1.3.


Calamity Jane


> Mark
>
>
>
> Am Montag, 25. Februar 2013 20:52:33 UTC+1 schrieb acl68:
>>
> Hi euromark,
>
>
> some questions to your readme:
>
> a) Copy this plugin into your /app/Plugin folder
> My app doesn't have a Plugin folder just a plugins folder. So I created
> an empty folder Plugin.
> Was that correct?
>
> b) I copied the contents of the Zip file in that folder so that I have 3
> subfolders: Console, Lib, Test
> Was taht correct or should the folder upgrade-master go there?
>
> c) In your readmy you mention "Run any of the above commands." My
> problem is that nowhere above you mention any commands. That comes
> later. So to which commands are you referring?
>
> d) If I try to run the following command (being in my app folder)
> /var/www/cakephp-2.3.0/app$ ../lib/Cake/Console/cake Upgrade.Upgrade
> locations -v
>
>
> I get the following output:
> PHP MissingPluginException: Plugin Upgrade could not be found. in
> /var/www/cakephp-2.3.0/lib/Cake/Core/CakePlugin.php on line 142
> PHP Stack trace:
> PHP 1. {main}() /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:0
> PHP 2. ShellDispatcher::run($argv = array (0 =>
> '/var/www/cakephp-2.3.0/lib/Cake/Console/cake.php', 1 => '-working', 2
> => '/var/www/cakephp-2.3.0/app', 3 => 'Upgrade.Upgrade', 4 =>
> 'locations', 5 => '-v'))
> /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:43
> PHP 3. ShellDispatcher->dispatch()
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:67
> PHP 4. ShellDispatcher->_getShell($shell = 'Upgrade.Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:189
> PHP 5. class_exists('UpgradeShell')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:239
> PHP 6. App::load($className = 'UpgradeShell')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:0
> PHP 7. App::path($type = 'Console/Command', $plugin = 'Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:542
> PHP 8. App::pluginPath($plugin = 'Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:225
> PHP 9. CakePlugin::path($plugin = 'Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:364
>
>
> MissingPluginException: Plugin Upgrade could not be found. in
> /var/www/cakephp-2.3.0/lib/Cake/Core/CakePlugin.php on line 142
>
> Call Stack:
> 0.0003 232072 1. {main}()
> /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:0
> 0.0095 317704 2. ShellDispatcher::run($argv = array (0 =>
> '/var/www/cakephp-2.3.0/lib/Cake/Console/cake.php', 1 => '-working', 2
> => '/var/www/cakephp-2.3.0/app', 3 => 'Upgrade.Upgrade', 4 =>
> 'locations', 5 => '-v'))
> /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php:43
> 0.0637 1920272 3. ShellDispatcher->dispatch()
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:67
> 0.0638 1920576 4. ShellDispatcher->_getShell($shell =
> 'Upgrade.Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:189
> 0.0640 1922128 5. class_exists('UpgradeShell')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:239
> 0.0640 1922424 6. App::load($className = 'UpgradeShell')
> /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php:0
> 0.0641 1923032 7. App::path($type = 'Console/Command', $plugin
> = 'Upgrade') /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:542
> 0.0641 1923168 8. App::pluginPath($plugin = 'Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:225
> 0.0641 1923200 9. CakePlugin::path($plugin = 'Upgrade')
> /var/www/cakephp-2.3.0/lib/Cake/Core/App.php:364
>
> Dump $_SERVER
> $_SERVER['HTTP_HOST'] is undefined
> $_SERVER['SERVER_NAME'] is undefined
>
> Variables in local scope (#9):
> $_plugins = *uninitialized*
> $plugin = 'Upgrade'
>
> Error: Plugin Upgrade could not be found.
> #0 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(364):
> CakePlugin::path('Upgrade')
> #1 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(225):
> App::pluginPath('Upgrade')
> #2 /var/www/cakephp-2.3.0/lib/Cake/Core/App.php(542):
> App::path('Console/Command', 'Upgrade')
> #3 [internal function]: App::load('UpgradeShell')
> #4 [internal function]: spl_autoload_call('UpgradeShell')
> #5 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(239):
> class_exists('UpgradeShell')
> #6 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(189):
> ShellDispatcher->_getShell('Upgrade.Upgrade')
> #7 /var/www/cakephp-2.3.0/lib/Cake/Console/ShellDispatcher.php(67):
> ShellDispatcher->dispatch()
> #8 /var/www/cakephp-2.3.0/lib/Cake/Console/cake.php(43):
> ShellDispatcher::run(Array)
> #9 {main}
>
> Ouch....
> Ok the Ouch was mine ;) Just a test if you read until here.
>
> As always any help is appreciated!
>
> Calamity Jane
>
>
>
>
>
> Am 24.02.2013 15:48, schrieb euromark:
>>>> You did read the readme.txt right? :)
>>>> It answers all of your questions above and many more..
>>>>
>>>>
>>>> Am Sonntag, 24. Februar 2013 14:05:52 UTC+1 schrieb acl68:
>>>>>
>>>> Hi everybody,
>>>>
>>>>
>>>> after getting strange error messages with the default 2.0 migration
>>>> shell I tried it now with the improved version from euromark:
>>>> https://github.com/dereuromark/upgrade
>>>>
>>>>
>>>> Here the facts:
>>>> I am running Linux with php 5.4.
>>>> I downloaded cake 2.3.0 and euromarks plug-in.
>>>> After unpacking the new cake version to my webroot ( and setting all
>>>> rights to executable for me an my Apache) I renamed my 1.3 app to "app",
>>>> adapted the cake core path in my webroot/index.php so it points to the
>>>> Cake folder in the "lib" folder. I renamed app/config to app/Config and
>>>> added the CakePlugin::loadAll(); to the bootstrap.
>>>>
>>>>
>>>> Questions:
>>>> Where do the files from the plug-in go? Do they just stay in the
>>>> app/plug-in/upgrade-master folder? Or do I replace the files in the
>>>> default Cake Core folders with them?
>>>>
>>>> Can I tell the upgrade shell which app it should update, or do I have to
>>>> rename it to "app"?
>>>>
>>>> When I tried to let it run no files were changed but empty folders
>>>> "Model" Controller" etc were created under /app/Console/...
>>>>
>>>>
>>>> Exists there somewhere an extensive HowTo for using this plug-in? The
>>>> readme doesn't answer all my questions.
>>>>
>>>>
>>>> Also it works only if I call the shell with
>>>> /var/www/cakephp-2.3.0/app/Console$ ./cake upgrade all
>>>> and not
>>>> /var/www/cakephp-2.3.0/app/Console$ ./cake Upgrade.Upgrade all
>>>>
>>>> Thanks for any help! If I don't get this done within the next week I
>>>> will stay with 1.3. *sigh*
>>>>
>>>> Calamity Jane
>>>>
>>>>>
>>>>
>
>>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlEuTpgACgkQbOdiIJzHNKFFmQCggcegUvqdOpS+B6ECh4a4rvfm
vTQAoKxVspB+SmR7aYkn+ZDUnGti6716
=p/6H
-----END PGP SIGNATURE-----

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: