Quantcast

Router::mapResources with Configure::write('Routing.admin', 'admin');

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Router::mapResources with Configure::write('Routing.admin', 'admin');

slawil

Hi,
I have enable Configure::write('Routing.admin', 'admin'); in core.php

and add

Router::mapResources('translators');

to route.php


now when i try to send HTTP DELETE request to /admin/translators/1
I'm getting error:

Missing Method in TranslatorsController
You are seeing this error because the action admin_1 is not defined in
controller TranslatorsController

i try with
Router::mapResources('translators',params("prefix"=>"admin/")); but
without any luck.

Is it this possible in cake 1.2 pre-beta to use admin routing with
REST routing ?


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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Router::mapResources with Configure::write('Routing.admin', 'admin');

Pelz
I'm having the same problem (but with 2.2.1). What I did was this:

Router::resourceMap(array(array('action' => 'admin_delete', 'method' => 'DELETE', 'id' => true)));
Router::mapResources('CookingUtensils', array('prefix' => '/admin/'));
Router::parseExtensions('xml');
but it doesn't work and I get:

<response>
   
<code>404</code>
   
<url>/MYPROJECTNAME/admin/cooking_utensils/7.xml</url>
   
<name>Private Action CookingUtensilsController::admin_delete() is not directly accessible.</name>
</response>
Does someone know how to do this correctly?

On Thursday, November 1, 2007 2:04:40 PM UTC+1, slawil wrote:
Hi,
I have enable Configure::write('Routing.admin', 'admin'); in core.php

and add

Router::mapResources('translators');

to route.php


now when i try to send HTTP DELETE request to /admin/translators/1
I'm getting error:

Missing Method in TranslatorsController
You are seeing this error because the action admin_1 is not defined in
controller TranslatorsController

i try with
Router::mapResources('translators',params("prefix"=>"admin/")); but
without any luck.

Is it this possible in cake 1.2 pre-beta to use admin routing with
REST routing ?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
[hidden email] For more options, visit this group at http://groups.google.com/group/cake-php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Router::mapResources with Configure::write('Routing.admin', 'admin');

Palli Kominak
i did it this way (without resourceMap() ):

Router::mapResources('lessons', array('prefix' => '/admin/'));

and then i could call REST on /myApp/admin/lessons/delete/1


On Saturday, August 4, 2012 6:05:30 PM UTC+2, Pelz wrote:
I'm having the same problem (but with 2.2.1). What I did was this:

Router::resourceMap(array(array('action' => 'admin_delete', 'method' => 'DELETE', 'id' => true)));
Router::mapResources('CookingUtensils', array('prefix' => '/admin/'));
Router::parseExtensions('xml');
but it doesn't work and I get:

<response>
   
<code>404</code>
   
<url>/MYPROJECTNAME/admin/cooking_utensils/7.xml</url>
   
<name>Private Action CookingUtensilsController::admin_delete() is not directly accessible.</name>
</response>
Does someone know how to do this correctly?

On Thursday, November 1, 2007 2:04:40 PM UTC+1, slawil wrote:
Hi,
I have enable Configure::write('Routing.admin', 'admin'); in core.php

and add

Router::mapResources('translators');

to route.php


now when i try to send HTTP DELETE request to /admin/translators/1
I'm getting error:

Missing Method in TranslatorsController
You are seeing this error because the action admin_1 is not defined in
controller TranslatorsController

i try with
Router::mapResources('translators',params("prefix"=>"admin/")); but
without any luck.

Is it this possible in cake 1.2 pre-beta to use admin routing with
REST routing ?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Loading...