Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin is not working with Cakephp 2.1.0 Stable #8

Open
renatorozas opened this issue Mar 8, 2012 · 6 comments
Open

This plugin is not working with Cakephp 2.1.0 Stable #8

renatorozas opened this issue Mar 8, 2012 · 6 comments

Comments

@renatorozas
Copy link

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.

@mikeradvak
Copy link

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.

@airios
Copy link

airios commented Mar 20, 2012

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'

@mikeradvak
Copy link

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

@ghost
Copy link

ghost commented Nov 26, 2012

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

@benirose
Copy link

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

@resting
Copy link

resting commented Feb 21, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants