Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:18:37+00:00 2026-06-10T22:18:37+00:00

Cakephp Pagination rendering issue. I am using cakephp 2.0.6. When i try to render

  • 0

Cakephp Pagination rendering issue. I am using cakephp 2.0.6. When i try to render a page from other action its fine. But when i try to go to next page the problem starts

I have the following function

   public function admin_index() 
   {
       //Function listing 
   }

The same function needed for all type of users(support,employee etc).
So I used the setAction method as follows

public function support_index() 
   {
        $this->setAction('admin_index');
        $this->render('admin_index');
   }

And my Pagination code is as follows :

    echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));

    echo $this->Paginator->numbers(array('separator' => ''));

    echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));

But when I try to go next page the URL as follows

http://www.example.com/support/users/admin_index/page:2
http://www.example.com/employee/users/admin_index/page:2

But the following output needs to come :

http://www.example.com/support/users/index/page:2
http://www.example.com/employee/users/index/page:2

The Problem is $this->setAction(‘admin_index’); i think.. any one helps appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:18:38+00:00Added an answer on June 10, 2026 at 10:18 pm

    I made the changes in the following file lib/Cake/Controller/Controller.php

    The changes made in setAction method it works well now. especially the problem is in 2.0.6

    public function setAction($action) {
        $this->request->params['action'] = $action; //Commented this Line 
        $this->view = $action; //Commented this Line
    
    
        $this->request->action = $action; // Added this Line
        $args = func_get_args();
        unset($args[0]);
        return call_user_func_array(array(&$this, $action), $args);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using cakephp 1.26. I am doing some self-learning about Pagination in CakePHP.
I am using cakephp 1.26 and doing pagination. could you help me with the
Cakephp 2.0 Pagination issue. How to pass arguments in pagination link? I passed the
Using CakePHP 1.3.6 I'm sure I may have to add code and examples, but
I am using Cakephp and try to customize the paginator result with some checkboxes
I'm building a web application in CakePHP. I'm using the Paginator object to render
The project is developed using CakePHP. The page is of a news feed article.
I'm using the CakePHP pagination helper in my view to display the sorting links
Special Characters and Pagination I'm using cakephp with charset=iso-8859-1. I know, I'd love to
hi i am using cakephp for my project but i am fetching problem when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.