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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:48:32+00:00 2026-06-17T18:48:32+00:00

I have a CakePHP 1.3 shell that requires the use of requestAction() to generate

  • 0

I have a CakePHP 1.3 shell that requires the use of requestAction() to generate HTML from a separate controller. The URL for that call is generated using:

$url = Router::url(array('controller' => 'my_controller', 'action' => $action_str));
$data = array('url' => array('ext' => 'json'), 
              'return' => 'return',
              'pass' => array('an_id_str' => $an_id));

$action_str, ‘an_id_str’, and $an_id are the only things in my code that change between calls, and requestAction() is called as such:

$this->requestAction($url, $data);

Note: since $action_str can change for each call, it generates the new $url for each individual requestAction() call.

The first time the requestAction() call is made, it works great. The second time I call requestAction(), it throws the following error:

"Error: Missing Controller 'c:\...\cake\console'"

Any ideas what might be causing the router to mess this up, and how I can fix it?

One note – this actually happens in a couple different shells that use similar functionality.

  • 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-17T18:48:33+00:00Added an answer on June 17, 2026 at 6:48 pm

    The correct fix for this issue is that in my $url array

    Router::url(array('controller' => 'my_controller', 'action' => $action_str));
    

    I needed to add the ‘base’ key and set it to false as such:

    Router::url(array('controller' => 'my_controller', 'action' => $action_str, 'base' => false));
    

    From the docs at http://api13.cakephp.org/view_source/router#line-733 :

    ‘There are a few ‘special’ parameters that can change the final URL string that is generated

    • base – Set to false to remove the base path from the generated url. If your application is not in the root directory, this can be used to generate urls that are ‘cake relative’. cake relative urls are required when using requestAction.”‘
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the CakePHP stack in /var/www/site from one view under controller A I
I have a CakePHP app that is being moved to Sql Server from MySql.
I have a CakePHP Console Shell that works fine until a Model->afterFind() tries to
I have a cakePHP application that is pulling data from two different databases, which
I have used cakePHP 1.2 and know how to use behaviors in it. using
I have a simple cakephp app with table articles that has a cat_id column
I'm new to CakePHP, and I'm trying to decide between the schema shell that
I have trouble getting the absolute path with cakephp while using a shell. Shell
I have a CakePHP website that acts as a questionnaire. It moves the user
I have a CakePHP 1.3 application that has a login system, which works well.

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.