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

  • Home
  • SEARCH
  • 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 5958593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:33:56+00:00 2026-05-22T18:33:56+00:00

I have an element with a requestAction but it gives me a never ending

  • 0

I have an element with a requestAction but it gives me a never ending request loop.

For example:

This is my element

<?php $plans = $this->requestAction('profile/Plans'); ?>
<?php foreach($plans as $plan): ?>

    <div class="notificationsmall <?php echo $plan['sections']['lable']; ?>">
        <p><b><?php echo $plan['plans']['plan_title']; ?></b></p>
        <p><?php echo $plan['plans']['plan_description']; ?></p>
    </div>  
<?php endforeach;?>

And this is the function that. Its in the “profile” controller

function Plans($id = Null){ 
    $this->set('plans', $this->Plan->Query('SELECT * FROM plans, sections WHERE plans.user_id='.$id.' AND sections.id=plans.section_id'));
}

I have no idea what’s wrong.

  • 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-05-22T18:33:56+00:00Added an answer on May 22, 2026 at 6:33 pm

    Is the first piece of code the profile/plans view? If so, you get an infinite loop because the view calls the profile/plans action again, comes back to the same point in the view and so on.

    Judging by the code I think you have some misunderstanding on how elements work. You should use the requestAction when you need to insert the element, not inside the element itself.

    (I agree with Dunhamzzz that requestAction should be avoided, but sometimes it’s not possible. You should consider if using actual elements would work in this case.)

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

Sidebar

Related Questions

I have span element <span class=tag onclick=clickTag(this) tagType=property> Which calls the clickTag method function
I have an element on the page that I've already centered horizontally and vertically
I have an element with a 70% width, and it is floating beside another
I have an element which displays a comment form, the action is comments/add. If
I have some element selected with jQuery selector. It is en element from list
I have an element with id: #post and that element has parent <li> .
I have an element which appears on many pages and I would like to
i have a element with id=' dummyfield ' and there is div after it
I have an element with some CSS rules applied as follows: <span class=rule1 rule2
I have an element: input name=crd[69][qty] id=crd[69][qty] value=1 size=4 class=input-text qty maxlength=12 Ii had

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.