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 1022515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:28:40+00:00 2026-05-16T11:28:40+00:00

I am using CakePHP v1.2 for my web application hosted here: http://lol-land.in The application

  • 0

I am using CakePHP v1.2 for my web application hosted here: http://lol-land.in

The application was working fine till Yesterday, but it suddenly started to get stuck in some redirection loops. What makes it weirder is the fact that the problem is with just one controller: posts. And even in that most of the functions are working. But http://lol-land.in/posts is redirecting to lol-land.in/posts/view/133 which is in turn redirecting to itself.

Actually 110 of the 117 posts of the form /posts/view/ are stuck in this 302 redirection.

Can anyone please tell me what could have caused this?

[CakePHP 1.3 and PHP5]

Edit: Adding View Logic

function view($id = null) {
$this->log("View Logic Entry", LOG_DEBUG);
// These Log entires are missing 

$this->layout = 'postview';
if (!$id) {
    $this->Session->setFlash(__('Invalid Post.', true));
    $this->log("Redirect due to missing id", LOG_DEBUG);
    $this->redirect(array('action'=>'index'));
}
$log = $this->Session->read('Auth.User');
$logid = $log['id'];

$temp = $this->Post->read(null, $id);

$ratings = $temp['Rating'];

$this->set(compact('up', 'down', 'userrated', 'userrateid'));

$coms = $temp['Comment'];
$comuser = array();
for ($i=0; $i<count($coms); $i++) {
    $comuser[$i] = $coms[$i]['user_id'];
}
$comuser = $this->Post->User->find('list', array( 'fields'=>array('User.id', 'User.username'),
                      'conditions'=>array("User.id" => $comuser)
                      ));
$this->set(compact('comuser'));

$this->pageTitle = $temp['Post']['title'];
$this->set('post', $temp);
$alltypes = $this->Post->Type->find('list', array('fields'=> array('Type.id', 'Type.typename')));
$selectedtab = -1;
$this->set(compact('alltypes', 'selectedtab' ));


//Calling updateFBStats
// Removed because unnecessary.

}

  • 1 1 Answer
  • 2 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-05-16T11:28:40+00:00Added an answer on May 16, 2026 at 11:28 am

    Chances are you are either 1) using circular references with the Auth component OR 2) the function in your controller is redirecting do to something within the method. Can you show the code of posts_controller.php function view() ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a web application using cakephp 1.2.6. There is a functionality that I
I'm looking into using CakePHP to build a web application. The sticking point is
I am writing a web application using CakePHP. Now with cake after a save
I'm writing a simple web application using CakePHP version 1.2 (the latest) and am
I am building a web application using CakePHP. I am using meioupload to upload
I am developing one web application using CakePHP , I will be providing one
I'm building a web application in CakePHP. I'm using the Paginator object to render
I am using the CakePHP framework to implement a Web application. I would add
I want to run a web application on php and mysql, using the CakePHP
I am using CakePHP for a web application. And I am in very initial

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.