I am using Cake 1.1.12.4205 calling a plugins action:

/catalog/search/General/
/<plugin(controller same name)>/<action>/<parameter>

All works fine. I add the following line to my default layout:

<?php echo $this->requestAction("Menu/display/main_menu",
array( "return"=>true ) ); ?>

Where the Menu controller is 'not' a plugin. It is a regular
controller. Still everything works fine.

Now I add the above line of code to the layout again, so it looks
like:

<?php echo $this->requestAction("Menu/display/main_menu",
array( "return"=>true ) ); ?>
<?php echo $this->requestAction("Menu/display/main_menu",
array( "return"=>true ) ); ?>

Strangely, the first one works, the second one doesn't!


I don't understand cake's inner workings yet, but I think the problem
may be in:
/cake/dispatcher.php - Line 92
if (!loadController($ctrlName)) {

This line seems to try to load a controller. If it returns false, it
is assumed that this is a plugin. However it also returns false when
the controller has already been loaded.

So in my above example, it that line returns false the 2nd time I call
requestAction and the dispatcher believes that my regular Menu
controller is a Menu plugin controller (which it is not).

To further complicate things, I couldn't just return true from
loadController if the controller has already been loaded, because it
will return true if a plugin controller has already been loaded, then
it will think that already loaded plugins are just regular
controllers.


I'm pretty new, so if this is a bug I will look for a way to report
it, but maybe I am just misunderstanding something.

Doug


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to