milesj / uploader

[Deprecated] A CakePHP plugin for file uploading and validating.
MIT License
193 stars 73 forks source link

Schema generator fails with Uploader class in Uploader v3.6.1 #115

Closed wolfmetr closed 11 years ago

wolfmetr commented 11 years ago

$ Console/cake schema generate

Welcome to CakePHP v2.2.7 Console App : git Path: /home/wolfmetr/dev/www/svadba/git/ Cake Schema Shell Generating Schema... PHP Fatal error: Class 'Uploader' not found in /home/wolfmetr/dev/www/svadba/git/Plugin/Uploader/Model/Behavior/AttachmentBehavior.php on line 104 Fatal Error Error: Class 'Uploader' not found in [/home/wolfmetr/dev/www/svadba/git/Plugin/Uploader/Model/Behavior/AttachmentBehavior.php, line 104]

2013-05-28 21:40:37 Error: Class 'Uploader' not found in [/home/wolfmetr/dev/www/svadba/git/Plugin/Uploader/Model/Behavior/AttachmentBehavior.php, line 104]

milesj commented 11 years ago

Import the Uploader then in your model? Or upgrade to v4?

wolfmetr commented 11 years ago

It didnt help. I found solution with hard require_once APP_DIR.'/Plugin/Uploader/Vendor/Uploader.php';

milesj commented 11 years ago

Weird that App::import() or App::uses() didn't work.

wolfmetr commented 11 years ago

Yes, its not perfect solution. But '"cake schema generate" just work.