Thursday, May 31, 2012

Re: Custom Find with Paging Problem - Cake 2.1.3



On Thursday, 31 May 2012 18:43:04 UTC+1, Glauco Custódio wrote:
Hi guys, I have created my own custom find method, it is working
properly, but does not work with paging.

See the code here:

http://bin.cakephp.org/view/1245017297

I get these errors:

Notice (8): Undefined index: popularity [CORE\Cake\Model\Model.php,
line 2734]

Notice (8): Undefined index: popularity [CORE\Cake\Model\Model.php,
line 2710]

I have followed this official tutorial:
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-custom-find

Anyone can help?

Thank you.

From your code, you seem to have a model named 'Model'. This is not a good idea since Model is a class in the Core code. Change the name of your app/Model/Model.php file and the model object within it and you should get further. Your references to the Model object in Product will need to change to the new name too of course.


--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: