mongoDB-Datasource icon indicating copy to clipboard operation
mongoDB-Datasource copied to clipboard

This plugin is not working with Cakephp 2.1.0 Stable

Open renatorozas opened this issue 12 years ago • 6 comments

I followed every instruction methodically, and I keep getting this error:

Error: Datasource class mongodb.mongodbSource could not be found.

I thought it had to do with the naming conventions on folders. I tried renaming each folder to Uppercase the first letter but it didn't work.

renatorozas avatar Mar 08 '12 20:03 renatorozas

The path to the model needs to be updated to Model/Datasource/MongodbSource.php. This fixed the issue for me. Other paths may need to be updated, as well.

mikeradvak avatar Mar 14 '12 18:03 mikeradvak

Yep, you have to update your paths described by @mikeradvak: YourApp/app/Plugin/Mongodb/Model/Datasource/MongodbSource.php YourApp/app/Plugin/Mongodb/Model/Behavior/Schemaless.php YourApp/app/Plugin/Mongodb/Model/Behavior/SqlCompatible.php From there you will have to update bootstrap.php: CakePlugin::load('Mongodb');

Then in MongodbSource.php: App::uses('DboSource', 'Model/Datasource');

This got me going on Cakephp 2. Hope that helps.

EDIT: Or you could just do this in your app/Plugin/Mongodb directory: 'git checkout -b cake2.0 origin/cake2.0'

airios avatar Mar 20 '12 03:03 airios

Also, forked and updated to be 2.0 compatible: https://github.com/mikeradvak/mongoDB-Datasource

mikeradvak avatar Mar 25 '12 16:03 mikeradvak

It would be good to update the readme for this fork (got me for a while)

Please include in README.markdown:

git clone -b cake2.0 git://github.com/ichikaway/cakephp-mongodb.git Mongodb

ghost avatar Nov 26 '12 15:11 ghost

This whole thing should actually be re-written to use MongoClient rather than the Mongo object, as Mongo is being deprecated. I may fork and do this if I ever have time or find myself with the smarts to make the change!

http://www.php.net/manual/en/class.mongo.php

benirose avatar Jan 31 '13 21:01 benirose

Can I say that this plugin is no longer being maintained for the latest changes of CakePHP and as @benirose mentioned, the new MongoClient class? Am having problems with naming conventions by following the installation instructions, and the last commit was 2 years ago.

resting avatar Feb 21 '13 07:02 resting