If this is a simple pagination problem then I am confused what it has
to do with the JsHelper?

As the error is from a helper is has to be realted to something in
your view/layout (unless your calling views in your controller).

Have you checked the error stack to see what line in your code is
creating the error?

HTH, Paul
@phpMagpie

On Sep 16, 6:44 pm, Caio Landau <c...@iai.art.br> wrote:
> I'm trying to do simple pagination with cake and getting the following
> error: "Warning (4096): Object of class JsHelper could not be
> converted to string [CORE/cake/libs/view/helpers/html.php, line 444]"
>
> Here is my code:
>
> //controllers/orders_controller.php
> class OrdersController extends AppController {
>
>     var $components = array("Security");
>     var $helpers = array("Html", "Form", "Session", "Number",
> "Paginator");
>     var $uses = array('Product', 'Order');
>     var $paginate = array('limit' => 10,'order' => array('Order.date'
> => 'asc'),'recursive' => 2);
>
>     function view($id = null) {
>         if ($id == NULL) {
>             $this->set("orders", $this->paginate("Order"));
>             $this->set("js", array("jquery-1.6.2.min",
> "viewOrders")); //Set a JS variable to be put on the head
>         } else {
>             $orders[0] = $this->Order->getOrder($id);
>             $this->set("orders", $orders);
>         }
>     }
>
> }
>
> The only place I'm calling the paginate function is here in the
> controller. Not calling anything (yet) on the view/model. If I comment
> the $this->set("orders", $this->paginate("Order")); line the error
> stops. Any idea?

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to