routing problem
i am saving the work in home page but it is not seen as the home page.some static page is loading as the home page.i want the page which i am changin as the home page.what should i do? home page is : http://dev.example.al/example1 the page i want as home : http://dev.example.al/example1/pages/home -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Routing problem with "/*" url
Hey, that was just a test to see if those two routes were working, am I right in assuming the members one worked and the posts one worked, but all your others did not? All you need to do is setup routes *before* the posts route to catch the ones which are currently broken, you can specifically define them like Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); or maybe the method of doing :controller/:action would work too. The reason you're having these issues is that routes are executed from the top down, so the first one to match is the one that is used. CakePHP automatically detects routes like :controller/:action/:param, but your /* route overrides this making this feature break. You need to specify the routes which are being overwritten and probably do the /* one last. Hope this helps i.e. On 3 January 2014 20:45, gonzela2006 wrote: > But other links like /pages/display/about gave me 404 error as it routes > to posts controller not pages controller. > > Thanks > > > On Friday, January 3, 2014 10:07:23 PM UTC+2, Stephen S wrote: > >> The link you gave me is done a little differently to how you are doing it >> now, all the post is introducing is a new method to parse the route itself. >> >> Normally you may have something like /posts/view/slug which may be public >> function view($slug = null), then you may execute a query to find the first >> post record which contained that exact slug and load the results into an >> array. Mark is doing a similar search in his actual custom route file, >> caching it, then passing that information to the controller so it doesn't >> have to do that. He doesn't appear to mention the issue you are having, >> unless I missed it, I'm afraid. >> >> Try this for me and see if it helps >> >> Router::connect( >> "/members/:plugin/:controller", >> array('action' => 'index', 'prefix' => members, members => true) >> ); >> Router::connect( >> "/members/:plugin/:controller/:action/*", >> array('prefix' => members, members => true) >> ); >> Router::connect( >> "/members/:controller", >> array('action' => 'index', 'prefix' => members, members => true) >> ); >> Router::connect( >> "/members/:controller/:action/*", >> array('prefix' => members, members => true) >> ); >> Router::connect('/*', array('controller' => 'posts', 'action' => 'view')); >> >> Then try to access /post-slug and /members/users/login and see what >> happens. >> >> >> On 3 January 2014 19:31, gonzela2006 wrote: >> >>> Hi Stephen, >>> >>> s members a prefix, or do you have a users method with login parameter, or do you have that as a custom route? >>> >>> Yes, members is a prefix but the problem also exists with urls without >>> prefix like /pages/display/about >>> >>> I found a post on Mark Story's blog that is talking about my problem but >>> it was for CakePHP 1.3 how can I use it with CakePHP 2? >>> >>> http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp >>> >>> Thanks >>> >>> >>> On Friday, January 3, 2014 9:16:58 PM UTC+2, Stephen S wrote: >>> A few things come to my mind off the top off my head. You could route your controller-action url's first, to catch the actual links such as /members/users/login (is members a prefix, or do you have a users method with login parameter, or do you have that as a custom route?) Then providing you did those routes correctly, the bottom route would catch anything that didn't match the earlier ones, hopefully your post slug. Another idea would be to use a regular expression to match the pattern of a "post-slug", if there are any distinguishing features this would be much more effective. If not I would recommend doing something like this: /posts/post-slug /blog/post-slug /keyword/post-slug (i.e. if I was writing on a health care blog, I would use /health/post-slug. This could produce something like /health/top-10-diet-tips which holds the keyword health as well as the slug.) It would be easier to avoid issues if you did it this way. HTH -- Kind Regards Stephen Speakman >>> -- >>> 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 cake-php+u...@googlegroups.com. >>> To post to this group, send email to cake...@googlegroups.com. >>> >>> Visit this group at http://groups.google.com/group/cake-php. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >> >> -- >> Kind Regards >> Stephen Speakman >> > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscrib
Re: Routing problem with "/*" url
But other links like /pages/display/about gave me 404 error as it routes to posts controller not pages controller. Thanks On Friday, January 3, 2014 10:07:23 PM UTC+2, Stephen S wrote: > > The link you gave me is done a little differently to how you are doing it > now, all the post is introducing is a new method to parse the route itself. > > Normally you may have something like /posts/view/slug which may be public > function view($slug = null), then you may execute a query to find the first > post record which contained that exact slug and load the results into an > array. Mark is doing a similar search in his actual custom route file, > caching it, then passing that information to the controller so it doesn't > have to do that. He doesn't appear to mention the issue you are having, > unless I missed it, I'm afraid. > > Try this for me and see if it helps > > Router::connect( > "/members/:plugin/:controller", > array('action' => 'index', 'prefix' => members, members => true) > ); > Router::connect( > "/members/:plugin/:controller/:action/*", > array('prefix' => members, members => true) > ); > Router::connect( > "/members/:controller", > array('action' => 'index', 'prefix' => members, members => true) > ); > Router::connect( > "/members/:controller/:action/*", > array('prefix' => members, members => true) > ); > Router::connect('/*', array('controller' => 'posts', 'action' => 'view')); > > Then try to access /post-slug and /members/users/login and see what > happens. > > > On 3 January 2014 19:31, gonzela2006 >wrote: > >> Hi Stephen, >> >> s members a prefix, or do you have a users method with login parameter, >>> or do you have that as a custom route? >> >> Yes, members is a prefix but the problem also exists with urls without >> prefix like /pages/display/about >> >> I found a post on Mark Story's blog that is talking about my problem but >> it was for CakePHP 1.3 how can I use it with CakePHP 2? >> >> http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp >> >> Thanks >> >> >> On Friday, January 3, 2014 9:16:58 PM UTC+2, Stephen S wrote: >> >>> A few things come to my mind off the top off my head. >>> >>> You could route your controller-action url's first, to catch the actual >>> links such as /members/users/login (is members a prefix, or do you have a >>> users method with login parameter, or do you have that as a custom route?) >>> >>> Then providing you did those routes correctly, the bottom route would >>> catch anything that didn't match the earlier ones, hopefully your post slug. >>> >>> Another idea would be to use a regular expression to match the pattern >>> of a "post-slug", if there are any distinguishing features this would be >>> much more effective. If not I would recommend doing something like this: >>> >>> /posts/post-slug >>> /blog/post-slug >>> /keyword/post-slug (i.e. if I was writing on a health care blog, I would >>> use /health/post-slug. This could produce something like >>> /health/top-10-diet-tips which holds the keyword health as well as the >>> slug.) >>> >>> It would be easier to avoid issues if you did it this way. >>> >>> HTH >>> >>> -- >>> Kind Regards >>> Stephen Speakman >>> >> -- >> 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 cake-php+u...@googlegroups.com . >> To post to this group, send email to cake...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/cake-php. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Kind Regards > Stephen Speakman > -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Routing problem with "/*" url
The link you gave me is done a little differently to how you are doing it now, all the post is introducing is a new method to parse the route itself. Normally you may have something like /posts/view/slug which may be public function view($slug = null), then you may execute a query to find the first post record which contained that exact slug and load the results into an array. Mark is doing a similar search in his actual custom route file, caching it, then passing that information to the controller so it doesn't have to do that. He doesn't appear to mention the issue you are having, unless I missed it, I'm afraid. Try this for me and see if it helps Router::connect( "/members/:plugin/:controller", array('action' => 'index', 'prefix' => members, members => true) ); Router::connect( "/members/:plugin/:controller/:action/*", array('prefix' => members, members => true) ); Router::connect( "/members/:controller", array('action' => 'index', 'prefix' => members, members => true) ); Router::connect( "/members/:controller/:action/*", array('prefix' => members, members => true) ); Router::connect('/*', array('controller' => 'posts', 'action' => 'view')); Then try to access /post-slug and /members/users/login and see what happens. On 3 January 2014 19:31, gonzela2006 wrote: > Hi Stephen, > > s members a prefix, or do you have a users method with login parameter, or >> do you have that as a custom route? > > Yes, members is a prefix but the problem also exists with urls without > prefix like /pages/display/about > > I found a post on Mark Story's blog that is talking about my problem but > it was for CakePHP 1.3 how can I use it with CakePHP 2? > > http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > Thanks > > > On Friday, January 3, 2014 9:16:58 PM UTC+2, Stephen S wrote: > >> A few things come to my mind off the top off my head. >> >> You could route your controller-action url's first, to catch the actual >> links such as /members/users/login (is members a prefix, or do you have a >> users method with login parameter, or do you have that as a custom route?) >> >> Then providing you did those routes correctly, the bottom route would >> catch anything that didn't match the earlier ones, hopefully your post slug. >> >> Another idea would be to use a regular expression to match the pattern of >> a "post-slug", if there are any distinguishing features this would be much >> more effective. If not I would recommend doing something like this: >> >> /posts/post-slug >> /blog/post-slug >> /keyword/post-slug (i.e. if I was writing on a health care blog, I would >> use /health/post-slug. This could produce something like >> /health/top-10-diet-tips which holds the keyword health as well as the >> slug.) >> >> It would be easier to avoid issues if you did it this way. >> >> HTH >> >> -- >> Kind Regards >> Stephen Speakman >> > -- > 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 cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/groups/opt_out. > -- Kind Regards Stephen Speakman -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Routing problem with "/*" url
Hi Stephen, s members a prefix, or do you have a users method with login parameter, or > do you have that as a custom route? Yes, members is a prefix but the problem also exists with urls without prefix like /pages/display/about I found a post on Mark Story's blog that is talking about my problem but it was for CakePHP 1.3 how can I use it with CakePHP 2? http://mark-story.com/posts/view/using-custom-route-classes-in-cakephp Thanks On Friday, January 3, 2014 9:16:58 PM UTC+2, Stephen S wrote: > > A few things come to my mind off the top off my head. > > You could route your controller-action url's first, to catch the actual > links such as /members/users/login (is members a prefix, or do you have a > users method with login parameter, or do you have that as a custom route?) > > Then providing you did those routes correctly, the bottom route would > catch anything that didn't match the earlier ones, hopefully your post slug. > > Another idea would be to use a regular expression to match the pattern of > a "post-slug", if there are any distinguishing features this would be much > more effective. If not I would recommend doing something like this: > > /posts/post-slug > /blog/post-slug > /keyword/post-slug (i.e. if I was writing on a health care blog, I would > use /health/post-slug. This could produce something like > /health/top-10-diet-tips which holds the keyword health as well as the > slug.) > > It would be easier to avoid issues if you did it this way. > > HTH > > -- > Kind Regards > Stephen Speakman > -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Routing problem with "/*" url
A few things come to my mind off the top off my head. You could route your controller-action url's first, to catch the actual links such as /members/users/login (is members a prefix, or do you have a users method with login parameter, or do you have that as a custom route?) Then providing you did those routes correctly, the bottom route would catch anything that didn't match the earlier ones, hopefully your post slug. Another idea would be to use a regular expression to match the pattern of a "post-slug", if there are any distinguishing features this would be much more effective. If not I would recommend doing something like this: /posts/post-slug /blog/post-slug /keyword/post-slug (i.e. if I was writing on a health care blog, I would use /health/post-slug. This could produce something like /health/top-10-diet-tips which holds the keyword health as well as the slug.) It would be easier to avoid issues if you did it this way. HTH On 3 January 2014 19:09, gonzela2006 wrote: > Hi, > > I want my posts url to be like this: > example.com/post-slug > so I added the routing rule on routes.php like this > > Router::connect('/*', array('controller' => 'posts', 'action' => 'view')); > > It works well but other links give 404 error like this one > > Error: The requested address '/members/users/login' was not found on this > server. > > Please advise > > Thanks > > -- > 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 cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/groups/opt_out. > -- Kind Regards Stephen Speakman -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Routing problem with "/*" url
Hi, I want my posts url to be like this: example.com/post-slug so I added the routing rule on routes.php like this Router::connect('/*', array('controller' => 'posts', 'action' => 'view')); It works well but other links give 404 error like this one Error: The requested address '/members/users/login' was not found on this server. Please advise Thanks -- 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 cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Routing Problem with CakePHP 2 in subdirectory without mod_rewrite
Taking a plain CakePHP 2.0.5 (or minor) and installing it in a subdirectory without mod_rewrite (removing the 3 .htaccess and uncommenting "Configure::write('App.baseUrl', env('SCRIPT_NAME'));" in core.php) brings up the following problem: Loading the root page like this: http://servername/some/subdir/ shows the error "SomeController could not be found." whereas loading the root page like this: http://servername/some/subdir/index.php works Might this be an Apache configuration issue? With CakePHP 1.3 I hadn't that problem on the same machine. Thanks, Stefan -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
routing Problem!
hi, first of all: sorry for my englisch! i would like realsies following url's: www.domain.com www.domain.com/somecategoriename/ www.domain.com/some-produkt-name.htm So without show the controller and the view in the URL. My current solution: routes.php conf. for PageController: Router::connect('/*', array('controller' => 'page', 'action' => 'index')); PageController(nicht zu verwechseln mit PagesController): request['pass'])){ //prepare $datas for Startpage and give them to the View $this->set('datas', $datas); } if(isset($this->request['pass'][0])){ //prepare $datas for Categorie Page and give them to the View $this->set('datas', $datas); } if(isset($this->request['pass'][0]) && isset($this->request['ext'])){ //prepare $datas for Artikel Page and give them to the View $this->set('datas', $datas); } } } ?> The page controller works. The startpage, category URL and the article URL i can catch and pass the data for the view. routes.php for AdminController: Router::connect('/admin/*', array('controller' => 'admin', 'action' => 'index')); Router::connect('/users/login/*', array('controller' => 'users', 'action' => 'login')); AdminController: array( 'authenticate' => array( 'Form' => array( 'fields' => array('username' => 'User.username', 'password' => 'User.password') ) ) ) ); public function index(){ $this->test(); } public function test(){ $this->autoRender = false; $this->index(); } } ?> However, I have a problem if I want to route into the admin area. About the index action will all be controlled. All other actions will receive a autoRender = false. They serve only for data processing. Error output from server: === Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. == Can i solve the problem differently or what is my false? Need help. Your answer could be both in English and in German. -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
routing problem!
hi, first of all: sorry for my englisch! i would like realsies following url's: www.domain.com www.domain.com/somecategoriename/ www.domain.com/some-product-name.htm So without show the controller and the view in the URL. My current solution: routes.php conf. for PageController: Router::connect('/*', array('controller' => 'page', 'action' => 'index')); PageController(not to be confused with PageController): request['pass'])){ //prepare $datas for Startpage and give them to the View $this->set('datas', $datas); } if(isset($this->request['pass'][0])){ //prepare $datas for Categorie Page and give them to the View $this->set('datas', $datas); } if(isset($this->request['pass'][0]) && isset($this->request['ext'])){ //prepare $datas for Artikel Page and give them to the View $this->set('datas', $datas); } } } ?> The page controller works. The startpage, category URL and the article URL i can catch and pass the data for the view. routes.php for AdminController: Router::connect('/admin/*', array('controller' => 'admin', 'action' => 'index')); Router::connect('/users/login/*', array('controller' => 'users', 'action' => 'login')); AdminController: array( 'authenticate' => array( 'Form' => array( 'fields' => array('username' => 'User.username', 'password' => 'User.password') ) ) ) ); public function index(){ $this->test(); } public function test(){ $this->autoRender = false; $this->index(); } } ?> However, I have a problem if I want to route into the admin area. About the index action will all be controlled. All other actions will receive a autoRender = false. They serve only for data processing. Error output from server: === Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. == Can i solve the problem differently or what is my false? Need help. Your answer could be both in English and in German. -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: plugin routing problem
Your Html->link() is correct and should point to /users/users/index . Check your routes.php, perhaps you are routing this to blog plugin. -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: plugin routing problem
I have not found myself on that situation, but my guess is that by default the controller name takes preference over the plugin name when the router is parsing the URL (in other words: you cannot have a plugin with the same name as a controller). I'm not sure if you could fix that by defining a connected route in the routes.php file. Cheers, - Johan On Tue, Aug 2, 2011 at 3:54 PM, john lyles wrote: > I'm building a blog plugin for CakePHP. It is called 'blog'. > > I am following the manual on plugin routing but my links won't work. > http://book.cakephp.org/view/951/Plugin-routing > > For example, when I am on this page: appname/blog/posts/index, I have > a link to the index action of the users plugin. So I built my link as > follows: > > echo $this->Html->link( >__('List Users', true), >array( >'plugin' => 'users', >'controller' => 'users', >'action' => 'index' >) > ); > But the link keep pointing to app/blog/users/index instead of app/ > users/users/index. Why is that? > > PS: users is also a plugin (from CakeDC). > > -- > 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 > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
plugin routing problem
I'm building a blog plugin for CakePHP. It is called 'blog'. I am following the manual on plugin routing but my links won't work. http://book.cakephp.org/view/951/Plugin-routing For example, when I am on this page: appname/blog/posts/index, I have a link to the index action of the users plugin. So I built my link as follows: echo $this->Html->link( __('List Users', true), array( 'plugin' => 'users', 'controller' => 'users', 'action' => 'index' ) ); But the link keep pointing to app/blog/users/index instead of app/ users/users/index. Why is that? PS: users is also a plugin (from CakeDC). -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Hi, routing problem localization
I'm trying to translate my application, works fine but I have a problem when changing the language, mi default language is english, but also work with Spanish this is my url has the lang tag. http://localhost/caketra/articles/index/lang:eng but my intention is to display in this way http://localhost/caketra/eng/articles/index/ or http://localhost/caketra/spa/articles/index/ and I use . Router:: connect ('/: lang /: controller /: action / *' array (), array ('lang' => '[a-z] {3 }')); I can I translate the main page without problems but when I see the details of an article I have this url http://localhost/caketra/articles/view/1 but when I click on Spanish language I have this errors http://localhost/caketra/articles/view/lang:spa I lose article's ID and see the / lang: spa, at the end of the url how I can solve this pd, sorry but my english is not very good. -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Prefix routing problem
no, i use the authsome component from debuggable... On 28 Mai, 10:18, Bogdan Bursuc wrote: > Do you use the Auth component ? > > > > On Fri, May 28, 2010 at 9:07 AM, cronet wrote: > > hm... > > > i solved my problem with the following route configuration: > > > Router::connect('/aktivieren/*', array('controller' => 'users', > > 'action' => 'activate', 'admin'=>null)); > > > I don't know why cake behave this way, because in the manual there's a > > note to user admin=>false, not admin=>null in the html link array... > > > On 28 Mai, 07:47, cronet wrote: > > > that does not solve the problem... > > > > Router::connect('/aktivieren', array('controller' => 'users', 'action' > > > => 'activate', 'admin'=>false, 'prefix'=>false )); > > > Router::connect('/aktivieren/', array('controller' => 'users', > > > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > > Router::connect('/aktivieren/*', array('controller' => 'users', > > > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > > > I tried all combinations and accessing > > > /aktivieren > > > /aktivieren/ > > > /aktivieren/blabla > > > > it ends up in "admin_activate" not "activate" > > > > On 28 Mai, 06:24, Bogdan Bursuc wrote: > > > > > You need to define the master route, also: > > > > > Router::connect('/aktivieren/', ...); That's the router you access when > > you > > > > enter /aktivieren. > > > > > On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > > > > > Hey, > > > > > > i defined the following route: > > > > > > Router::connect('/aktivieren/*', array('controller' => > > 'users', > > > > > 'action' => 'activate', 'admin'=>false)); > > > > > > But everytime when I try to access /aktivieren cake routes me to > > > > > admin_activatie... > > > > > > Here ar some vars from pr($this) > > > > > > [action] => admin_activate > > > > > [uses] => > > > > > [params] => Array > > > > > ( > > > > > [named] => Array > > > > > ( > > > > > ) > > > > > > [pass] => Array > > > > > ( > > > > > ) > > > > > > [controller] => users > > > > > [action] => admin_activate > > > > > [admin] => > > > > > [prefix] => admin > > > > > [plugin] => > > > > > [form] => Array > > > > > ( > > > > > ) > > > > > > [url] => Array > > > > > ( > > > > > [url] => aktivieren > > > > > ) > > > > > > ) > > > > > > Why I get always to admin, even when i set admin=>false ? > > > > > > Regards, > > > > > AxlF > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > > others > > > > > with their CakePHP related questions. > > > > > > You received this message because you are subscribed to the Google > > Groups > > > > > "CakePHP" group. > > > > > To post to this group, send email to cake-php@googlegroups.com > > > > > To unsubscribe from this group, send email to > > > > > cake-php+unsubscr...@googlegroups.com > > >For > > more options, visit this group at > > > > >http://groups.google.com/group/cake-php?hl=en > > > > > -- > > > > Bogdan Iulian Bursuc > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > -- > Bogdan Iulian Bursuc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Prefix routing problem
Do you use the Auth component ? On Fri, May 28, 2010 at 9:07 AM, cronet wrote: > hm... > > i solved my problem with the following route configuration: > > Router::connect('/aktivieren/*', array('controller' => 'users', > 'action' => 'activate', 'admin'=>null)); > > > > I don't know why cake behave this way, because in the manual there's a > note to user admin=>false, not admin=>null in the html link array... > > > > On 28 Mai, 07:47, cronet wrote: > > that does not solve the problem... > > > > Router::connect('/aktivieren', array('controller' => 'users', 'action' > > => 'activate', 'admin'=>false, 'prefix'=>false )); > > Router::connect('/aktivieren/', array('controller' => 'users', > > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > Router::connect('/aktivieren/*', array('controller' => 'users', > > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > > > I tried all combinations and accessing > > /aktivieren > > /aktivieren/ > > /aktivieren/blabla > > > > it ends up in "admin_activate" not "activate" > > > > On 28 Mai, 06:24, Bogdan Bursuc wrote: > > > > > You need to define the master route, also: > > > > > Router::connect('/aktivieren/', ...); That's the router you access when > you > > > enter /aktivieren. > > > > > On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > > > > Hey, > > > > > > i defined the following route: > > > > > >Router::connect('/aktivieren/*', array('controller' => > 'users', > > > > 'action' => 'activate', 'admin'=>false)); > > > > > > But everytime when I try to access /aktivieren cake routes me to > > > > admin_activatie... > > > > > > Here ar some vars from pr($this) > > > > > >[action] => admin_activate > > > >[uses] => > > > >[params] => Array > > > >( > > > >[named] => Array > > > >( > > > >) > > > > > >[pass] => Array > > > >( > > > >) > > > > > >[controller] => users > > > >[action] => admin_activate > > > >[admin] => > > > >[prefix] => admin > > > >[plugin] => > > > >[form] => Array > > > >( > > > >) > > > > > >[url] => Array > > > >( > > > >[url] => aktivieren > > > >) > > > > > >) > > > > > > Why I get always to admin, even when i set admin=>false ? > > > > > > Regards, > > > > AxlF > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > others > > > > with their CakePHP related questions. > > > > > > You received this message because you are subscribed to the Google > Groups > > > > "CakePHP" group. > > > > To post to this group, send email to cake-php@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > cake-php+unsubscr...@googlegroups.com > >For > more options, visit this group at > > > >http://groups.google.com/group/cake-php?hl=en > > > > > -- > > > Bogdan Iulian Bursuc > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- Bogdan Iulian Bursuc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Prefix routing problem
hm... i solved my problem with the following route configuration: Router::connect('/aktivieren/*', array('controller' => 'users', 'action' => 'activate', 'admin'=>null)); I don't know why cake behave this way, because in the manual there's a note to user admin=>false, not admin=>null in the html link array... On 28 Mai, 07:47, cronet wrote: > that does not solve the problem... > > Router::connect('/aktivieren', array('controller' => 'users', 'action' > => 'activate', 'admin'=>false, 'prefix'=>false )); > Router::connect('/aktivieren/', array('controller' => 'users', > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > Router::connect('/aktivieren/*', array('controller' => 'users', > 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); > > I tried all combinations and accessing > /aktivieren > /aktivieren/ > /aktivieren/blabla > > it ends up in "admin_activate" not "activate" > > On 28 Mai, 06:24, Bogdan Bursuc wrote: > > > You need to define the master route, also: > > > Router::connect('/aktivieren/', ...); That's the router you access when you > > enter /aktivieren. > > > On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > > > Hey, > > > > i defined the following route: > > > > Router::connect('/aktivieren/*', array('controller' => 'users', > > > 'action' => 'activate', 'admin'=>false)); > > > > But everytime when I try to access /aktivieren cake routes me to > > > admin_activatie... > > > > Here ar some vars from pr($this) > > > > [action] => admin_activate > > > [uses] => > > > [params] => Array > > > ( > > > [named] => Array > > > ( > > > ) > > > > [pass] => Array > > > ( > > > ) > > > > [controller] => users > > > [action] => admin_activate > > > [admin] => > > > [prefix] => admin > > > [plugin] => > > > [form] => Array > > > ( > > > ) > > > > [url] => Array > > > ( > > > [url] => aktivieren > > > ) > > > > ) > > > > Why I get always to admin, even when i set admin=>false ? > > > > Regards, > > > AxlF > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.comFor > > > more options, visit this group at > > >http://groups.google.com/group/cake-php?hl=en > > > -- > > Bogdan Iulian Bursuc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Prefix routing problem
that does not solve the problem... Router::connect('/aktivieren', array('controller' => 'users', 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); Router::connect('/aktivieren/', array('controller' => 'users', 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); Router::connect('/aktivieren/*', array('controller' => 'users', 'action' => 'activate', 'admin'=>false, 'prefix'=>false )); I tried all combinations and accessing /aktivieren /aktivieren/ /aktivieren/blabla it ends up in "admin_activate" not "activate" On 28 Mai, 06:24, Bogdan Bursuc wrote: > You need to define the master route, also: > > Router::connect('/aktivieren/', ...); That's the router you access when you > enter /aktivieren. > > > > On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > > Hey, > > > i defined the following route: > > > Router::connect('/aktivieren/*', array('controller' => 'users', > > 'action' => 'activate', 'admin'=>false)); > > > But everytime when I try to access /aktivieren cake routes me to > > admin_activatie... > > > Here ar some vars from pr($this) > > > [action] => admin_activate > > [uses] => > > [params] => Array > > ( > > [named] => Array > > ( > > ) > > > [pass] => Array > > ( > > ) > > > [controller] => users > > [action] => admin_activate > > [admin] => > > [prefix] => admin > > [plugin] => > > [form] => Array > > ( > > ) > > > [url] => Array > > ( > > [url] => aktivieren > > ) > > > ) > > > Why I get always to admin, even when i set admin=>false ? > > > Regards, > > AxlF > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en > > -- > Bogdan Iulian Bursuc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Prefix routing problem
You need to define the master route, also: Router::connect('/aktivieren/', ...); That's the router you access when you enter /aktivieren. On Fri, May 28, 2010 at 2:05 AM, cronet wrote: > Hey, > > i defined the following route: > >Router::connect('/aktivieren/*', array('controller' => 'users', > 'action' => 'activate', 'admin'=>false)); > > But everytime when I try to access /aktivieren cake routes me to > admin_activatie... > > Here ar some vars from pr($this) > >[action] => admin_activate >[uses] => >[params] => Array >( >[named] => Array >( >) > >[pass] => Array >( >) > >[controller] => users >[action] => admin_activate >[admin] => >[prefix] => admin >[plugin] => >[form] => Array >( >) > >[url] => Array >( >[url] => aktivieren >) > >) > > > Why I get always to admin, even when i set admin=>false ? > > Regards, > AxlF > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- Bogdan Iulian Bursuc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Prefix routing problem
Hey, i defined the following route: Router::connect('/aktivieren/*', array('controller' => 'users', 'action' => 'activate', 'admin'=>false)); But everytime when I try to access /aktivieren cake routes me to admin_activatie... Here ar some vars from pr($this) [action] => admin_activate [uses] => [params] => Array ( [named] => Array ( ) [pass] => Array ( ) [controller] => users [action] => admin_activate [admin] => [prefix] => admin [plugin] => [form] => Array ( ) [url] => Array ( [url] => aktivieren ) ) Why I get always to admin, even when i set admin=>false ? Regards, AxlF Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: I think I've got a routing problem - welcome page is perfect but app is broken
RewriteEngine on RewriteBase /myproject RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] And don't forget to restart Apache after change of httpd.conf Also make sure that you edit right httpd.conf (at least with php.ini on Win XAMP it is common mistake). On Nov 10, 3:54 am, Peter Bowen wrote: > Thanks but it didn't help. I'm desperate enough to start looking at > Code Igniter :( > > On Nov 9, 3:21 pm, "Dr. Loboto" wrote: > > > > > Try add rewrite base to your webroot .htacces: > > RewriteBase /myproject > > > On Nov 9, 3:43 am, Peter Bowen wrote: > > > > Hi, > > > > I'm sure the routing is messed up somewhere and I'd appreciate some > > > help (8 hours of googling and experimenting and I'd be about ready to > > > tear my hair out if I wasn't already bald). > > > > --setup-- > > > I'm using Mac OSX with XAMPP for development. I've got the project in > > > a subdirectory on Xampp's webroot: > > > httpdocs/myproject/ > > > > I've enabled rewrite in httpd.conf: > > > LoadModule rewrite_module modules/mod_rewrite.so > > > > I've set up an alias in httpd.conf: > > > Alias /quote-reminder /Applications/xampp/xamppfiles/htdocs/myproject/ > > > app/webroot > > > > > > AllowOverride All > > > Options All > > > Order allow,deny > > > Allow from all > > > > > > > I've got 3 .htaccess files each with: > > > > > > RewriteEngine on > > > RewriteRule ^$ webroot/ [L] > > > RewriteRule (.*) webroot/$1 [L] > > > > > > > I've baked my app and have model, controller and view files > > > > --the problem-- > > > I can see the pretty welcome screen (with the css) when I go to > > > localhost/myproject/ > > > > If I type in localhost/myproject/user or localhost/myproject/user > > > expecting to see something to do with my user model I get a 404 > > > error. > > > > If I type inhttp://localhost/myproject/index.php/usersgivesmea > > > list of users but without any css > > > > --thanks-- > > > I'd really appreciate some pointers. Even better would be someone who > > > lives near Portsmouth or on the Isle of Wight who would give me an > > > hour of their expertise in exchange for lunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: I think I've got a routing problem - welcome page is perfect but app is broken
Thanks but it didn't help. I'm desperate enough to start looking at Code Igniter :( On Nov 9, 3:21 pm, "Dr. Loboto" wrote: > Try add rewrite base to your webroot .htacces: > RewriteBase /myproject > > On Nov 9, 3:43 am, Peter Bowen wrote: > > > Hi, > > > I'm sure the routing is messed up somewhere and I'd appreciate some > > help (8 hours of googling and experimenting and I'd be about ready to > > tear my hair out if I wasn't already bald). > > > --setup-- > > I'm using Mac OSX with XAMPP for development. I've got the project in > > a subdirectory on Xampp's webroot: > > httpdocs/myproject/ > > > I've enabled rewrite in httpd.conf: > > LoadModule rewrite_module modules/mod_rewrite.so > > > I've set up an alias in httpd.conf: > > Alias /quote-reminder /Applications/xampp/xamppfiles/htdocs/myproject/ > > app/webroot > > > > AllowOverride All > > Options All > > Order allow,deny > > Allow from all > > > > > I've got 3 .htaccess files each with: > > > > RewriteEngine on > > RewriteRule ^$ webroot/ [L] > > RewriteRule (.*) webroot/$1 [L] > > > > > I've baked my app and have model, controller and view files > > > --the problem-- > > I can see the pretty welcome screen (with the css) when I go to > > localhost/myproject/ > > > If I type in localhost/myproject/user or localhost/myproject/user > > expecting to see something to do with my user model I get a 404 > > error. > > > If I type inhttp://localhost/myproject/index.php/usersgivesme a > > list of users but without any css > > > --thanks-- > > I'd really appreciate some pointers. Even better would be someone who > > lives near Portsmouth or on the Isle of Wight who would give me an > > hour of their expertise in exchange for lunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: I think I've got a routing problem - welcome page is perfect but app is broken
Try add rewrite base to your webroot .htacces: RewriteBase /myproject On Nov 9, 3:43 am, Peter Bowen wrote: > Hi, > > I'm sure the routing is messed up somewhere and I'd appreciate some > help (8 hours of googling and experimenting and I'd be about ready to > tear my hair out if I wasn't already bald). > > --setup-- > I'm using Mac OSX with XAMPP for development. I've got the project in > a subdirectory on Xampp's webroot: > httpdocs/myproject/ > > I've enabled rewrite in httpd.conf: > LoadModule rewrite_module modules/mod_rewrite.so > > I've set up an alias in httpd.conf: > Alias /quote-reminder /Applications/xampp/xamppfiles/htdocs/myproject/ > app/webroot > > AllowOverride All > Options All > Order allow,deny > Allow from all > > > I've got 3 .htaccess files each with: > > RewriteEngine on > RewriteRule ^$ webroot/ [L] > RewriteRule (.*) webroot/$1 [L] > > > I've baked my app and have model, controller and view files > > --the problem-- > I can see the pretty welcome screen (with the css) when I go to > localhost/myproject/ > > If I type in localhost/myproject/user or localhost/myproject/user > expecting to see something to do with my user model I get a 404 > error. > > If I type inhttp://localhost/myproject/index.php/usersgives me a > list of users but without any css > > --thanks-- > I'd really appreciate some pointers. Even better would be someone who > lives near Portsmouth or on the Isle of Wight who would give me an > hour of their expertise in exchange for lunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
I think I've got a routing problem - welcome page is perfect but app is broken
Hi, I'm sure the routing is messed up somewhere and I'd appreciate some help (8 hours of googling and experimenting and I'd be about ready to tear my hair out if I wasn't already bald). --setup-- I'm using Mac OSX with XAMPP for development. I've got the project in a subdirectory on Xampp's webroot: httpdocs/myproject/ I've enabled rewrite in httpd.conf: LoadModule rewrite_module modules/mod_rewrite.so I've set up an alias in httpd.conf: Alias /quote-reminder /Applications/xampp/xamppfiles/htdocs/myproject/ app/webroot AllowOverride All Options All Order allow,deny Allow from all I've got 3 .htaccess files each with: RewriteEngine on RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] I've baked my app and have model, controller and view files --the problem-- I can see the pretty welcome screen (with the css) when I go to localhost/myproject/ If I type in localhost/myproject/user or localhost/myproject/user expecting to see something to do with my user model I get a 404 error. If I type in http://localhost/myproject/index.php/users gives me a list of users but without any css --thanks-- I'd really appreciate some pointers. Even better would be someone who lives near Portsmouth or on the Isle of Wight who would give me an hour of their expertise in exchange for lunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
well i didn't want to do it this way but in my bootstrap: define('SEO_SEPERATOR', '_'); now in my links: $html->link('mylink', array('controller'=>'mycontroler', 'action'=>'myaction', 'sid'=>$sid, 'slug'=>$slug . SEO_SEPERATOR)); in my router connect('/:slug:sid/*, etc etc') this works for right now but it definatley has potential to break if i start moving urls around. On Aug 7, 12:47 pm, JamesF wrote: > ok this is driving me nuts now. basically if i put an underscore after > the parameter e.x :slug_ > cake is expecting to find a match on 'slug_' not 'slug' as i want. if > i put an underscore before slug ex _:slug it works fine. > it appears underscore doesn't work as a variable delimiter. > > On Aug 6, 2:03 pm, JamesF wrote: > > > @brian > > > yes in that attempt i was trying to see how the router was parsing > > underscores, in the first example slug was 'slug' and the route > > was /:slug_:sid/ > > in the last example i was curious to try slug as 'slug_', with the > > route as /:slug__:sid/ to see how theregexparsed. > > > basically whenever i put another character like ) or - before the > > underscore of the next parameter, (or after the first, im not sure of > > how its parsing) > > like this: > > /:slug-_:sid/ > > > i get what i want. /my-slug-is-so-great-except-for-the-last-dash-_sid/ > > > trust me if it were up to me i would ditch the underscore altogether > > for : like /slug:sid > > > On Aug 6, 12:28 pm, brian wrote: > > > > You've got 2 underscores here: > > > '/:slug__:sid/*' > > > > If it was up to me, I'd just drop the underscores altogether. Just > > > append sid to slug. > > > > On Thu, Aug 6, 2009 at 11:36 AM, JamesF wrote: > > > > > i even tried this thinking i was clever > > > > > Router::connect( > > > > '/:slug__:sid/*', > > > > array('controller' => mycontroller, 'action' => 'index'), > > > > array( > > > > 'pass'=>array('sid', 'slug_'), > > > > 'sid'=>'[0-9]+', > > > > 'slug_'=>'[0-9a-z-]+', > > > > ) > > > > ); > > > > > which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- > > > > slug > > > > > On Aug 6, 5:13 am, "Dr. Loboto" wrote: > > > >> Router::connect( > > > >> '/:slug_:sid/*', > > > >> array('controller' => mycontroller, 'action' => 'index'), > > > >> array( > > > >> 'pass'=>array('sid', 'slug'), > > > >> 'sid'=>'[0-9]+', > > > >> 'slug'=>'[0-9a-z-]+', > > > >> ) > > > >> ); > > > > >> On Aug 6, 2:29 am, JamesF wrote: > > > > >> > for some reason when i am putting an underscore directly after a > > > >> > named > > > >> > argument in my route, it breaks. > > > > >> > doesn't work: > > > >> > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > > > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > > >> > 'sid'=>'[0-9]+')); > > > > >> > if i put a dash or any other character right after my first argument > > > >> > it works ok but that is not my desired url. > > > >> > i would like /slug_sid/* > > > > >> > (my slug is something like my-article-title) > > > > >> > works: > > > >> > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > > > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > > >> > 'sid'=>'[0-9]+')); > > > > >> > i saw a bug report about this but nate closed it saying that theregex > > > >> > wasn't specific enough. i have admittley weakregexskills does anyone > > > >> > kow a possible solution? > > > > >> > thanks- Hide quoted text - > > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
ok this is driving me nuts now. basically if i put an underscore after the parameter e.x :slug_ cake is expecting to find a match on 'slug_' not 'slug' as i want. if i put an underscore before slug ex _:slug it works fine. it appears underscore doesn't work as a variable delimiter. On Aug 6, 2:03 pm, JamesF wrote: > @brian > > yes in that attempt i was trying to see how the router was parsing > underscores, in the first example slug was 'slug' and the route > was /:slug_:sid/ > in the last example i was curious to try slug as 'slug_', with the > route as /:slug__:sid/ to see how theregexparsed. > > basically whenever i put another character like ) or - before the > underscore of the next parameter, (or after the first, im not sure of > how its parsing) > like this: > /:slug-_:sid/ > > i get what i want. /my-slug-is-so-great-except-for-the-last-dash-_sid/ > > trust me if it were up to me i would ditch the underscore altogether > for : like /slug:sid > > On Aug 6, 12:28 pm, brian wrote: > > > You've got 2 underscores here: > > '/:slug__:sid/*' > > > If it was up to me, I'd just drop the underscores altogether. Just > > append sid to slug. > > > On Thu, Aug 6, 2009 at 11:36 AM, JamesF wrote: > > > > i even tried this thinking i was clever > > > > Router::connect( > > > '/:slug__:sid/*', > > > array('controller' => mycontroller, 'action' => 'index'), > > > array( > > > 'pass'=>array('sid', 'slug_'), > > > 'sid'=>'[0-9]+', > > > 'slug_'=>'[0-9a-z-]+', > > > ) > > > ); > > > > which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- > > > slug > > > > On Aug 6, 5:13 am, "Dr. Loboto" wrote: > > >> Router::connect( > > >> '/:slug_:sid/*', > > >> array('controller' => mycontroller, 'action' => 'index'), > > >> array( > > >> 'pass'=>array('sid', 'slug'), > > >> 'sid'=>'[0-9]+', > > >> 'slug'=>'[0-9a-z-]+', > > >> ) > > >> ); > > > >> On Aug 6, 2:29 am, JamesF wrote: > > > >> > for some reason when i am putting an underscore directly after a named > > >> > argument in my route, it breaks. > > > >> > doesn't work: > > >> > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > >> > 'sid'=>'[0-9]+')); > > > >> > if i put a dash or any other character right after my first argument > > >> > it works ok but that is not my desired url. > > >> > i would like /slug_sid/* > > > >> > (my slug is something like my-article-title) > > > >> > works: > > >> > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > >> > 'sid'=>'[0-9]+')); > > > >> > i saw a bug report about this but nate closed it saying that theregex > > >> > wasn't specific enough. i have admittley weakregexskills does anyone > > >> > kow a possible solution? > > > >> > thanks- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
@brian yes in that attempt i was trying to see how the router was parsing underscores, in the first example slug was 'slug' and the route was /:slug_:sid/ in the last example i was curious to try slug as 'slug_', with the route as /:slug__:sid/ to see how the regex parsed. basically whenever i put another character like ) or - before the underscore of the next parameter, (or after the first, im not sure of how its parsing) like this: /:slug-_:sid/ i get what i want. /my-slug-is-so-great-except-for-the-last-dash-_sid/ trust me if it were up to me i would ditch the underscore altogether for : like /slug:sid On Aug 6, 12:28 pm, brian wrote: > You've got 2 underscores here: > '/:slug__:sid/*' > > If it was up to me, I'd just drop the underscores altogether. Just > append sid to slug. > > > > On Thu, Aug 6, 2009 at 11:36 AM, JamesF wrote: > > > i even tried this thinking i was clever > > > Router::connect( > > '/:slug__:sid/*', > > array('controller' => mycontroller, 'action' => 'index'), > > array( > > 'pass'=>array('sid', 'slug_'), > > 'sid'=>'[0-9]+', > > 'slug_'=>'[0-9a-z-]+', > > ) > > ); > > > which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- > > slug > > > On Aug 6, 5:13 am, "Dr. Loboto" wrote: > >> Router::connect( > >> '/:slug_:sid/*', > >> array('controller' => mycontroller, 'action' => 'index'), > >> array( > >> 'pass'=>array('sid', 'slug'), > >> 'sid'=>'[0-9]+', > >> 'slug'=>'[0-9a-z-]+', > >> ) > >> ); > > >> On Aug 6, 2:29 am, JamesF wrote: > > >> > for some reason when i am putting an underscore directly after a named > >> > argument in my route, it breaks. > > >> > doesn't work: > >> > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > >> > 'sid'=>'[0-9]+')); > > >> > if i put a dash or any other character right after my first argument > >> > it works ok but that is not my desired url. > >> > i would like /slug_sid/* > > >> > (my slug is something like my-article-title) > > >> > works: > >> > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > >> > 'sid'=>'[0-9]+')); > > >> > i saw a bug report about this but nate closed it saying that the regex > >> > wasn't specific enough. i have admittley weak regex skills does anyone > >> > kow a possible solution? > > >> > thanks- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
You've got 2 underscores here: '/:slug__:sid/*' If it was up to me, I'd just drop the underscores altogether. Just append sid to slug. On Thu, Aug 6, 2009 at 11:36 AM, JamesF wrote: > > i even tried this thinking i was clever > > Router::connect( > '/:slug__:sid/*', > array('controller' => mycontroller, 'action' => 'index'), > array( > 'pass'=>array('sid', 'slug_'), > 'sid'=>'[0-9]+', > 'slug_'=>'[0-9a-z-]+', > ) > ); > > which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- > slug > > > On Aug 6, 5:13 am, "Dr. Loboto" wrote: >> Router::connect( >> '/:slug_:sid/*', >> array('controller' => mycontroller, 'action' => 'index'), >> array( >> 'pass'=>array('sid', 'slug'), >> 'sid'=>'[0-9]+', >> 'slug'=>'[0-9a-z-]+', >> ) >> ); >> >> On Aug 6, 2:29 am, JamesF wrote: >> >> > for some reason when i am putting an underscore directly after a named >> > argument in my route, it breaks. >> >> > doesn't work: >> > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), >> > 'sid'=>'[0-9]+')); >> >> > if i put a dash or any other character right after my first argument >> > it works ok but that is not my desired url. >> > i would like /slug_sid/* >> >> > (my slug is something like my-article-title) >> >> > works: >> > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, >> > 'action' => 'index'), array('pass'=>array('sid', 'slug'), >> > 'sid'=>'[0-9]+')); >> >> > i saw a bug report about this but nate closed it saying that the regex >> > wasn't specific enough. i have admittley weak regex skills does anyone >> > kow a possible solution? >> >> > thanks > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
i even tried this thinking i was clever Router::connect( '/:slug__:sid/*', array('controller' => mycontroller, 'action' => 'index'), array( 'pass'=>array('sid', 'slug_'), 'sid'=>'[0-9]+', 'slug_'=>'[0-9a-z-]+', ) ); which gave me mysite.com/mycontroller/index/sid:12345/slug_:this-is-my- slug On Aug 6, 5:13 am, "Dr. Loboto" wrote: > Router::connect( > '/:slug_:sid/*', > array('controller' => mycontroller, 'action' => 'index'), > array( > 'pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+', > 'slug'=>'[0-9a-z-]+', > ) > ); > > On Aug 6, 2:29 am, JamesF wrote: > > > for some reason when i am putting an underscore directly after a named > > argument in my route, it breaks. > > > doesn't work: > > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > 'sid'=>'[0-9]+')); > > > if i put a dash or any other character right after my first argument > > it works ok but that is not my desired url. > > i would like /slug_sid/* > > > (my slug is something like my-article-title) > > > works: > > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > 'sid'=>'[0-9]+')); > > > i saw a bug report about this but nate closed it saying that the regex > > wasn't specific enough. i have admittley weak regex skills does anyone > > kow a possible solution? > > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
thanks for your help. i tested your regex for 'slug' and i still ran in to the same problem. i actually tried that same matching pattern before i posted this. very similar issue https://trac.cakephp.org/ticket/5737 On Aug 6, 5:13 am, "Dr. Loboto" wrote: > Router::connect( > '/:slug_:sid/*', > array('controller' => mycontroller, 'action' => 'index'), > array( > 'pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+', > 'slug'=>'[0-9a-z-]+', > ) > ); > > On Aug 6, 2:29 am, JamesF wrote: > > > for some reason when i am putting an underscore directly after a named > > argument in my route, it breaks. > > > doesn't work: > > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > 'sid'=>'[0-9]+')); > > > if i put a dash or any other character right after my first argument > > it works ok but that is not my desired url. > > i would like /slug_sid/* > > > (my slug is something like my-article-title) > > > works: > > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > > 'sid'=>'[0-9]+')); > > > i saw a bug report about this but nate closed it saying that the regex > > wasn't specific enough. i have admittley weak regex skills does anyone > > kow a possible solution? > > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Routing problem with underscores and named arguments
Router::connect( '/:slug_:sid/*', array('controller' => mycontroller, 'action' => 'index'), array( 'pass'=>array('sid', 'slug'), 'sid'=>'[0-9]+', 'slug'=>'[0-9a-z-]+', ) ); On Aug 6, 2:29 am, JamesF wrote: > for some reason when i am putting an underscore directly after a named > argument in my route, it breaks. > > doesn't work: > Router::connect('/:slug_:sid/*', array('controller' => mycontroller, > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+')); > > if i put a dash or any other character right after my first argument > it works ok but that is not my desired url. > i would like /slug_sid/* > > (my slug is something like my-article-title) > > works: > Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, > 'action' => 'index'), array('pass'=>array('sid', 'slug'), > 'sid'=>'[0-9]+')); > > i saw a bug report about this but nate closed it saying that the regex > wasn't specific enough. i have admittley weak regex skills does anyone > kow a possible solution? > > thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Routing problem with underscores and named arguments
for some reason when i am putting an underscore directly after a named argument in my route, it breaks. doesn't work: Router::connect('/:slug_:sid/*', array('controller' => mycontroller, 'action' => 'index'), array('pass'=>array('sid', 'slug'), 'sid'=>'[0-9]+')); if i put a dash or any other character right after my first argument it works ok but that is not my desired url. i would like /slug_sid/* (my slug is something like my-article-title) works: Router::connect('/:slug-_:sid/*', array('controller' => mycontroller, 'action' => 'index'), array('pass'=>array('sid', 'slug'), 'sid'=>'[0-9]+')); i saw a bug report about this but nate closed it saying that the regex wasn't specific enough. i have admittley weak regex skills does anyone kow a possible solution? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
App.base and routing problem
I'm writing a facebook app and am having problems with my routing. First off I changed App.base to point to my facebook canvas path: Configure::write('App.base', '/my_app'); I did this so I could use $html->url() to construct my URLs in my views. It works great except for one problem. I have a route defined as follows: Router::connect('/', array('controller'=>'pages', 'action'=>'display', 'canvas')); Before I changed the App.base it would display the canvas page fine. With App.base changed to '/my_app' I get an error when visiting '/ my_app/': Error: MyAppController could not be found. If I go to '/my_app/index.php' I get the canvas page fine. Can anyone understand what is going on here? Thanks for any advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Routing problem
Hello group, i'm fairly new to cake and now i'm facing a problem with routing. I would like to route a request like "/tasks/result.php?valid" to "/ tasks/result/valid". So i was trying the following: Router::connect("/tasks/result.php?valid", array('controller' => 'tasks', 'action' => 'result', 'valid')); Unfortunately that didn't work. Could anybody tell me, how to correctly route this url? Thanks in advance. Sebastian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: Admin Routing Problem
Tim, Trac is emitting a 500 error right now. Would you mind posting a synopsis? I'm also having problems with admin routing and wonder if it's related. On Wed, May 21, 2008 at 8:34 AM, Sliv (Tim MacAleese) <[EMAIL PROTECTED]> wrote: > > If you're using the Auth component with admin routing, you might want > to review this recent ticket to see if it applies to you: > https://trac.cakephp.org/ticket/4708 > > > On May 20, 2:54 pm, "Joel K." <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I'm using admin routing for a personal site that I'm building: >> mrjoelkemp.com. Admin routing was working on the appropriate modules >> (namely software and writing), however, oddly, it seems that over the >> past week the routing has been failing on the writing module, but not >> the software module. I'm sure that, in general, the code is similar >> between both modules (with the module name discrepancy): >> >> if($session->read('User.admin') == 1) >> echo $html->link('New Article', '/admin/articles/add'); >> >> Here's the admin_add controller function for the writing (article) >> module: >> >> function admin_add() >> { >> $this->checkAuthentication(); >> >> if (!empty($this->data['Article'])) >> { >>if($this->Article->save($this->data['Article'])) >>{ >> $this->redirect('/articles/'); >>} >> } >> >> } >> >> And here's that checkAuthentication() function: >> >> function checkAuthentication() >> { >> if (!$this->Session->check('User')) >> { >> // Save intended URL in format '/controller/action/param' >> $this->Session->write('intended_url', substr($this->here, >> strlen($this->base))); >> $this->redirect('/users/login'); >> } >> >> }//end checkAuthentication() >> >> If this is unrelated to code, and perhaps, has something to do with >> session logs or tmp cache files, please let me know. I've cleared them >> all, to no avail. >> >> Thanks. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: Admin Routing Problem
If you're using the Auth component with admin routing, you might want to review this recent ticket to see if it applies to you: https://trac.cakephp.org/ticket/4708 On May 20, 2:54 pm, "Joel K." <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using admin routing for a personal site that I'm building: > mrjoelkemp.com. Admin routing was working on the appropriate modules > (namely software and writing), however, oddly, it seems that over the > past week the routing has been failing on the writing module, but not > the software module. I'm sure that, in general, the code is similar > between both modules (with the module name discrepancy): > > if($session->read('User.admin') == 1) > echo $html->link('New Article', '/admin/articles/add'); > > Here's the admin_add controller function for the writing (article) > module: > > function admin_add() > { > $this->checkAuthentication(); > > if (!empty($this->data['Article'])) > { >if($this->Article->save($this->data['Article'])) >{ > $this->redirect('/articles/'); >} > } > > } > > And here's that checkAuthentication() function: > > function checkAuthentication() > { > if (!$this->Session->check('User')) > { > // Save intended URL in format '/controller/action/param' > $this->Session->write('intended_url', substr($this->here, > strlen($this->base))); > $this->redirect('/users/login'); > } > > }//end checkAuthentication() > > If this is unrelated to code, and perhaps, has something to do with > session logs or tmp cache files, please let me know. I've cleared them > all, to no avail. > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Admin Routing Problem
Hello, I'm using admin routing for a personal site that I'm building: mrjoelkemp.com. Admin routing was working on the appropriate modules (namely software and writing), however, oddly, it seems that over the past week the routing has been failing on the writing module, but not the software module. I'm sure that, in general, the code is similar between both modules (with the module name discrepancy): if($session->read('User.admin') == 1) echo $html->link('New Article', '/admin/articles/add'); Here's the admin_add controller function for the writing (article) module: function admin_add() { $this->checkAuthentication(); if (!empty($this->data['Article'])) { if($this->Article->save($this->data['Article'])) { $this->redirect('/articles/'); } } } And here's that checkAuthentication() function: function checkAuthentication() { if (!$this->Session->check('User')) { // Save intended URL in format '/controller/action/param' $this->Session->write('intended_url', substr($this->here, strlen($this->base))); $this->redirect('/users/login'); } }//end checkAuthentication() If this is unrelated to code, and perhaps, has something to do with session logs or tmp cache files, please let me know. I've cleared them all, to no avail. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~--~~~~--~~--~--~---
Re: Routing problem when using admin urls
I too encountered this same issue, it turns out it needs an additional parameter. Try this: $Route->connect('/admin/', array('controller' => 'foo', 'action' => 'index', 'admin' => 1)); On Jan 11, 12:52 pm, Greg Baker <[EMAIL PROTECTED]> wrote: > I want to routewww.example.com/admintowww.example.com/admin/foo/index > > so I tried the following routes, none of which work.. > > $Route->connect('/admin/', array('controller' => 'foo', 'action' > => 'admin_index')) // gives me a Private Method in Controller error > $Route->connect('/admin/', array('controller' => 'foo', 'action' > => 'index')) //kinda works, but doesn't connect me to > Foo::admin_index() but rather just Foo::index() > > Is it possible to do what I am looking for here? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing problem when using admin urls
I want to route www.example.com/admin to www.example.com/admin/foo/index so I tried the following routes, none of which work.. $Route->connect('/admin/', array('controller' => 'foo', 'action' => 'admin_index')) // gives me a Private Method in Controller error $Route->connect('/admin/', array('controller' => 'foo', 'action' => 'index')) //kinda works, but doesn't connect me to Foo::admin_index() but rather just Foo::index() Is it possible to do what I am looking for here? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Admin Routing, problem upgrading (using )
well, just now, i will search group to this answer, thanks a lot! On Nov 9, 12:42 pm, phpjoy <[EMAIL PROTECTED]> wrote: > i overlooked that one, thank you > > On Nov 9, 1:20 pm, AD7six <[EMAIL PROTECTED]> wrote: > > > On Nov 9, 9:46 am, phpjoy <[EMAIL PROTECTED]> wrote: > > > > Hey, > > > > I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. > > > > My admin routing stopped working: > > > My old routing is: (in routes.php) > > > Router::connect('/admin/', array('controller' => 'backend_home', > > > 'action'=> 'home', 'admin'=>1)); > > > > core.php: > > > Configure::write('Routing.admin', 'admin'); > > > > inside the controller: > > > function admin_home() { > > > $this->set('title', 'Main'); > > > } > > > see the release announcements and/or the router testcase. you need to > > add 'prefix' => 'admin' > > > hth, > > > AD --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Admin Routing, problem upgrading (using )
i overlooked that one, thank you On Nov 9, 1:20 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Nov 9, 9:46 am, phpjoy <[EMAIL PROTECTED]> wrote: > > > > > Hey, > > > I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. > > > My admin routing stopped working: > > My old routing is: (in routes.php) > > Router::connect('/admin/', array('controller' => 'backend_home', > > 'action'=> 'home', 'admin'=>1)); > > > core.php: > > Configure::write('Routing.admin', 'admin'); > > > inside the controller: > > function admin_home() { > > $this->set('title', 'Main'); > > } > > see the release announcements and/or the router testcase. you need to > add 'prefix' => 'admin' > > hth, > > AD --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Admin Routing, problem upgrading (using )
On Nov 9, 9:46 am, phpjoy <[EMAIL PROTECTED]> wrote: > Hey, > > I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. > > My admin routing stopped working: > My old routing is: (in routes.php) > Router::connect('/admin/', array('controller' => 'backend_home', > 'action'=> 'home', 'admin'=>1)); > > core.php: > Configure::write('Routing.admin', 'admin'); > > inside the controller: > function admin_home() { > $this->set('title', 'Main'); > } > see the release announcements and/or the router testcase. you need to add 'prefix' => 'admin' hth, AD --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Admin Routing, problem upgrading (using )
> I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. > > My admin routing stopped working: > My old routing is: (in routes.php) > Router::connect('/admin/', array('controller' => 'backend_home', > 'action'=> 'home', 'admin'=>1)); > > core.php: > Configure::write('Routing.admin', 'admin'); > > inside the controller: > function admin_home() { > $this->set('title', 'Main'); > } > > > The Error: > Missing Method in BackendHomeController > You are seeing this error because the action home is not defined in > controller BackendHomeController > > > I think it's a problem in routing.php: > Router::connect('/admin/', array('controller' => 'backend_home', > 'action'=> 'home', 'admin'=>1)); > What should it be? hmm, are you going to have a route for each admin function? why not just change: Configure::write('Routing.admin', 'backend'); and name your methods: backend_home() etc etc Also, do you have a controller called 'BackendHome' with a method called 'home' ? should the controller not be called 'backend'? anyhoo, I think you want something like: Router::connect('/admin/', array( 'controller' => 'backend_home', 'action' => 'home', 'admin' => true, 'prefix' => Configure::read('Routing.admin') ) ); hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Admin Routing, problem upgrading (using )
Hey, I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1. My admin routing stopped working: My old routing is: (in routes.php) Router::connect('/admin/', array('controller' => 'backend_home', 'action'=> 'home', 'admin'=>1)); core.php: Configure::write('Routing.admin', 'admin'); inside the controller: function admin_home() { $this->set('title', 'Main'); } The Error: Missing Method in BackendHomeController You are seeing this error because the action home is not defined in controller BackendHomeController I think it's a problem in routing.php: Router::connect('/admin/', array('controller' => 'backend_home', 'action'=> 'home', 'admin'=>1)); What should it be? Thanks in advanced --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: routing problem ... need your opinion...
What I really want is to make it looks like in del.icio.us the format loooks like : www.example.com/username/controller/parameter and it could be www.example.com/controller/parameter can i check whether the username exist or not on bootstrap (using database) ? how to use model in bootstrap ... i would like, if the username is not exist then it will be redirected to www.example.com/controller/parameter thank you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
routing problem ... need your opinion...
I asked to create a uniqe url from my client, he want to have uniqe url because he want to track their marketing plans. for example: www.xyz.com/google/document_title www.xyz.com/yahoo/document_title www.xyz.com/otherportal/document_title www.xyz.com/directmarketing/document_title www.xyz.com/1234/document_title www.xyz.com/abcef/document_title www.xyz.com/document_title goes on the same page (like on www.xyz.com/document_title ) but with different data like different phone or email address... how to configure the route for that problem ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Routing Problem
Hi All, I have routes.php configured with custom url : Router::connect('/cat/*', array('controller' => 'users', 'action' => 'goto')); But when I type http://localhost/cat/2100 it returns : Missing Method in UsersController You are seeing this error because the action cat is not defined in controller UsersController If you want to customize this error message, create app\views/errors/missing_action.ctp. Fatal : Confirm you have created the UsersController::cat in file : app\controllers\users_controller.php. And I already have goto() function in my users_controller.php file. What's wrong ? Thanks, Feris --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
routing problem with pretty url (index.php is missing in the url)
Hi, I use pretty url for a project and all work fine on my server. On my client server the " index.php " is not build in the url made by cake. Exemple : $ajax->link('linkName, "/myController/myAction/",array("update" => "content"),null,FALSE) give On Development server -- http://cakeApp.devDomain.com/index.php/mycontroller/myAction and on my Client server : http://cakeApp.devDomain.com/mycontroller/myAction The " index.php " is not build by cake and i got a fileNoFoud error. Maybe i have to cange the apache conf ? What's wrong ? THanks for your help --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: routing problem after upgrade
> $Route->connect('/artists/view/*', array('controller' => 'artists', > 'action' => 'view', 'artists', 'Artists')); > $Route->connect('/artists/*', array('controller' => 'artists', > 'action' => 'index', 'artists', 'Artists')); Just found the bug :-) seems that in the past releases calling myapp.org/artists/type4 overwrite the array with "type4". on the latests releases the passed array overwrite the parameter passed via GET index ($type=null) { } so the solution was simple: remove the 2 exceeding declarations on the array: $Route->connect('/artists/view/*', array('controller' => 'artists', 'action' => 'view')); $Route->connect('/artists/*', array('controller' => 'artists', 'action' => 'index')); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [EMAIL PROTECTED] 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 -~--~~~~--~~--~--~---
routing problem after upgrade
Hello, I have upgraded cake to the latest stable and I have some problems with routing. I need to call a route that report a list of types. myapp.org/artists/type1 myapp.org/artists/type3 myapp.org/artists/type6 and when i call "view" i need to see the single artist by id myapp.org/artists/view/id on routes.php i have $Route->connect('/artists/view/*', array('controller' => 'artists', 'action' => 'view', 'artists', 'Artists')); $Route->connect('/artists/*', array('controller' => 'artists', 'action' => 'index', 'artists', 'Artists')); and this worked until the upgrade. in the controller i have index ($type=null) { //before the upgrade when calling myapp.org/artists/type6 the $type variable contained "type6" // after the upgrade $type variable contains "artists" } Before the upgrade when i called myapp.org/artists/view/6 showed me the proper action via the view($id=null) function in the controller. After the upgrade myapp.org/artists/view/6 just rewrite the url to myapp.org/artists/index Any idea of what happens? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [EMAIL PROTECTED] 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 -~--~~~~--~~--~--~---