In applying the answer from a previous question, I tried overriding one of CakePHP\'s built-in pagination methods:
function paginateCount($conditions = null, $re
This usually happens when CakePHP can't find the method in the model or attached behaviors.
It then passes the call to the datasource (hoping it has the method and knows what to do) and that's why you get this error.
I would check things are what they seem (is the method in the right model, is Cake making an automodel because of incorrect filenaming, etc.)
I've fixed this without really addressing the question I asked.
Instead of passing the adjusted parameters up the chain as I wanted to do in my above example, I've used them to do the same job directly:
return $this->find('count', compact($conditions, $recursive, $extra));
This works OK, but doesn't explain the odd behaviour that caused me to ask the question in the first place. My guess is that Cake is doing something funky with virtual/"automagic" methods.