Re: Starting with 1.13 or 2.0
I began a project three months ago with 1.x. I think there are more plugins, behaviors, etc... you can reuse from the bakery for the 1.x version. I also think that the enhancements in 2.x are not so important if you are begining a small project compared with the time you can save reusing code. When versión 2.x gets more mature I may consider migrating to that version, but It will take time and a lot of tests. I think the main thing, that is the way you have to code, the MVC architecture and the main components and helpers, remain nearly the same in both versions, so if you don't have to do something very strange, it shouldn't be a hard task to migrate to 2.x when you have to. Regards, Pedro. On 9 ene, 05:18, José Lorenzo wrote: > 2.0 -- 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
Richardus Ari invites you to connect
Join Richardus Ari on Yahoo! Messenger. Come chat with me, share files and more. Stay in the loop with all your friends. Get started : http://invite.msg.yahoo.com/invite?op=accept&intl=us&sig=vkNUQiTY5CQeLBsCgbH5xSzHuolTm11by9QZoZXP5y3AxPbPSmVSCYhuM_4- * Stay connected at home, at work, or on the go * Have fun with games, emoticons, and more * Join a community of over 100 million people from around the world Join Your Friends : http://invite.msg.yahoo.com/invite?op=accept&intl=us&sig=vkNUQiTY5CQeLBsCgbH5xSzHuolTm11by9QZoZXP5y3AxPbPSmVSCYhuM_4- -- this email was sent to you by an automated system - please do not reply directly -- 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: Remove Pagination Controls if 1 page only
Thanks, Just what I was after. On Jan 10, 10:36 am, majna wrote: > if ($this->Paginator->hasPage(2)) { > // display prev, next, numers... > > > > > > > > -- 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: CakeEmail: getting error using example from Cake Book
solved... had to remove ->message('My Message') On Jan 9, 8:46 pm, Carlton wrote: > Request Controller & debug($this->Request pasted in the bin. > > http://bin.cakephp.org/view/1801792118 > > Thanks for taking a look > > On Jan 9, 8:41 am, majna wrote: > > > > > > > > > please paste Request controller. > > > Try to call (form Request controller): > > debug($this->Request); > > > and paste output (http://bin.cakephp.org) -- 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: Config\email.php isnt loaded
I found the problem, when i create the CakeEmail object i have to do in this way: $email = new CakeEmail('default'); if not it doesnt includes the php file, but isnt that a bug? why i have to specify default if i have it on my email.php? On 9 ene, 20:58, Arnold wrote: > Well thats all the code, is a very simple setup. > > Why my Config/email.php isnt loaded? i put a die on the top but is > never executed, i check the CakeEmail.php from core but i was unable > to find any line to load email.php, what should load it? > > $email = new CakeEmail(); > $email->from(array('test231...@gmail.com' => 'test')) > ->to($data['User'] > > ['email']) ->subject('Welcome!') > ->send('Please log in with your > new credentials'); > On 9 ene, 08:28, majna wrote: > > > > > > > > > could you paste more code? -- 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: Fatal error: Class 'security' not found... in cake 2
It should be needed, it defines the package to import from. On Jan 9, 12:12 pm, Daniel wrote: > Thanks. I'm guessing Utility is not neccessarily needed? > > On Jan 9, 6:15 pm, Miles J wrote: > > > > > > > > > First off, security should be capitalized. Secondly, import it: > > > App::uses('Security', 'Utility'); > > > On Jan 9, 10:09 am, Daniel wrote: > > > > I imported some code from a cake 1.3 application to cake 2, now I get > > > an error on the following line: > > > $this->data['User']['password'] = security::hash($this->data['User'] > > > ['password'], NULL, TRUE); > > > > Fatal error: Class 'security' not found in C:\xampp\htdocs\xx\Model > > > \User.php on line 112- Hide quoted text - > > > - Show quoted text - -- 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: Config\email.php isnt loaded
Well thats all the code, is a very simple setup. Why my Config/email.php isnt loaded? i put a die on the top but is never executed, i check the CakeEmail.php from core but i was unable to find any line to load email.php, what should load it? $email = new CakeEmail(); $email- >from(array('test231...@gmail.com' => 'test')) >->to($data['User'] ['email']) ->subject('Welcome!') ->send('Please log in with your new credentials'); On 9 ene, 08:28, majna wrote: > could you paste more code? -- 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: CakeEmail: getting error using example from Cake Book
Request Controller & debug($this->Request pasted in the bin. http://bin.cakephp.org/view/1801792118 Thanks for taking a look On Jan 9, 8:41 am, majna wrote: > please paste Request controller. > > Try to call (form Request controller): > debug($this->Request); > > and paste output (http://bin.cakephp.org) -- 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: CakePHP 2.1-alpha just baked
you are right, jose. allow() makes it work again. allow(NULL) not, though. I wonder if that could be seen as a bug (since NULL is usually equal to void and equal to "nothing")... On 9 Jan., 20:37, majna wrote: > There's one more nice feature added -multi-model fieldList > support(whitelist)https://github.com/cakephp/cakephp/commit/ba27c8c2016f47ab6d64c6dec6f... -- 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: Remove Pagination Controls if 1 page only
if ($this->Paginator->hasPage(2)) { // display prev, next, numers... } -- 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: How to import another class into a component
OK, I found this http://book.cakephp.org/1.3/view/1579/Library-classes 1.App::import('Lib', 'ImageManipulation'); //imports app/libs/ image_manipulation.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
Re: How to import another class into a component
On Jan 10, 12:13 am, euromark wrote: > what type is your class? > a component? helper? model? lib? > It doesn't have to be a component, it's just a library. -- 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: How to import another class into a component
what type is your class? a component? helper? model? lib? On 10 Jan., 01:10, Daniel wrote: > From within a component I want to do the following: > > class MyComponent extends Component { > > function myfunc() { > $my_obj = new MyClass(); > $my_data = $my_obj->SomeMember(); > > ...where MyClass is declared in another file. > > Thanks. -- 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
How to import another class into a component
>From within a component I want to do the following: class MyComponent extends Component { function myfunc() { $my_obj = new MyClass(); $my_data = $my_obj->SomeMember(); ...where MyClass is declared in another file. Thanks. -- 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
Remove Pagination Controls if 1 page only
Is there an easy way to simply remove the previous / next controls if there is only one page of data found? Thanks -- 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: getPath - error
Most likely getpath() is not a method on the User model. -- 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: Correct way with ACL
The "right" way, according to MVC, would be to define the menu in a controller and set a view var. You can check out the AclMenuComponent[1]. You can always check permissions in the view if you want to. Or, create a helper that checks them for you. Whatever works for your app. 1: http://mark-story.com/posts/view/acl-menu-component -- 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
Correct way with ACL
Hello, today i only read manuals with ACL. Well works good with the controller. Now is the Question with the Views. I read there is no included way to check the permissions in the views. When i have a Navigation with user/moderate/admin links its bad when everybody can see this. I'm really sorry but i dont find a example or the right way to handle this. Steffen -- 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
getPath - error
Hello everybody, When i use debug($this->User->getpath('10')); i get an error: Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getpath' at line 1 SQL Query: getpath Notice: If you want to customize this error message, create app\View \Errors\pdo_error.ctp Is that a bug? Steffen -- 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: Fatal error: Class 'security' not found... in cake 2
Thanks. I'm guessing Utility is not neccessarily needed? On Jan 9, 6:15 pm, Miles J wrote: > First off, security should be capitalized. Secondly, import it: > > App::uses('Security', 'Utility'); > > On Jan 9, 10:09 am, Daniel wrote: > > > > > I imported some code from a cake 1.3 application to cake 2, now I get > > an error on the following line: > > $this->data['User']['password'] = security::hash($this->data['User'] > > ['password'], NULL, TRUE); > > > Fatal error: Class 'security' not found in C:\xampp\htdocs\xx\Model > > \User.php on line 112- Hide quoted text - > > - Show quoted text - -- 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: Fatal error: Class 'security' not found... in cake 2
and for hasing user passwords use AuthComponent::password('yourpassword'); -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/1/9 Miles J > First off, security should be capitalized. Secondly, import it: > > App::uses('Security', 'Utility'); > > On Jan 9, 10:09 am, Daniel wrote: > > I imported some code from a cake 1.3 application to cake 2, now I get > > an error on the following line: > > $this->data['User']['password'] = security::hash($this->data['User'] > > ['password'], NULL, TRUE); > > > > Fatal error: Class 'security' not found in C:\xampp\htdocs\xx\Model > > \User.php on line 112 > > -- > 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
Re: new action is being blocked by AuthComponent and I'm not sure why
sorry forgot to add that line 75 is: $pathparts = explode('/',$this->Auth->action()); -- 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: new action is being blocked by AuthComponent and I'm not sure why
thanks geoff. I'm not clear what the ACO table is-- I don't see any such table in the db (and I don't think that cakePHP can build tables like RoR can anyway). I've put your code into my appcontroller and then put the initAco() method into the controller I'm working with and am now getting the error: Fatal error: Call to undefined method AuthComponent::action() in / home1/criticc1/public_html/dev/app/Controller/AppController.php on line 75 I'm using cakePHP 2.0.3, do you think your code should work for this version? I'll also look into how to use the cake console, I haven't gotten very far with that yet. thanks again for any help and sorry for the delay, I got pulled off on other projects and then the holidays. -- 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: CakePHP 2.1-alpha just baked
There's one more nice feature added -multi-model fieldList support(whitelist) https://github.com/cakephp/cakephp/commit/ba27c8c2016f47ab6d64c6dec6fb1d1491dd674f -- 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: Newbie needs to be kicked
In 1.3, go to chapter 11 and there you will build a small blog. You can also purchase a book from Amazon that will push you in the right direction. On Mon, Jan 9, 2012 at 1:39 PM, Yves S. Garret wrote: > If you are using 2.0: > http://book.cakephp.org/2.0/en/ > If you are using 1.3: > http://book.cakephp.org/view/876/The-Manual > > > On Mon, Jan 9, 2012 at 11:26 AM, jeremyharris wrote: > >> It sounds like your requests to google are going to be a regular thing, >> like a CRON job. If I'm correct in assuming this, your best bet is to >> create a Shell class that you will run via CRON to regularly collect data >> and place it in your database. >> >> Frontend-wise, I'm not sure what you're doing so there's not much I can >> say, although after the data is collected you can display or do whatever >> you want with it. >> >> -- >> 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
Re: Newbie needs to be kicked
If you are using 2.0: http://book.cakephp.org/2.0/en/ If you are using 1.3: http://book.cakephp.org/view/876/The-Manual On Mon, Jan 9, 2012 at 11:26 AM, jeremyharris wrote: > It sounds like your requests to google are going to be a regular thing, > like a CRON job. If I'm correct in assuming this, your best bet is to > create a Shell class that you will run via CRON to regularly collect data > and place it in your database. > > Frontend-wise, I'm not sure what you're doing so there's not much I can > say, although after the data is collected you can display or do whatever > you want with it. > > -- > 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
Re: Asset filtering CakePHP 2.0.5 / css.php not included anymore?
Use more advanced solutions like the AssetCompress plugin github.com/markstory/asset_compress -- 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: Fatal error: Class 'security' not found... in cake 2
First off, security should be capitalized. Secondly, import it: App::uses('Security', 'Utility'); On Jan 9, 10:09 am, Daniel wrote: > I imported some code from a cake 1.3 application to cake 2, now I get > an error on the following line: > $this->data['User']['password'] = security::hash($this->data['User'] > ['password'], NULL, TRUE); > > Fatal error: Class 'security' not found in C:\xampp\htdocs\xx\Model > \User.php on line 112 -- 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
Fatal error: Class 'security' not found... in cake 2
I imported some code from a cake 1.3 application to cake 2, now I get an error on the following line: $this->data['User']['password'] = security::hash($this->data['User'] ['password'], NULL, TRUE); Fatal error: Class 'security' not found in C:\xampp\htdocs\xx\Model \User.php on line 112 -- 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
Asset filtering CakePHP 2.0.5 / css.php not included anymore?
Hi there I've tried to enable the CSS asset filtering in CakePHP 2.0.5, but it doesn't work. "csspp" is placed in vendors. It seems the required file "css.php" in the webroot-dir is missing. Any hints? Or has the scheme changed in 2.0? Thank you, Frank -- 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: Newbie needs to be kicked
It sounds like your requests to google are going to be a regular thing, like a CRON job. If I'm correct in assuming this, your best bet is to create a Shell class that you will run via CRON to regularly collect data and place it in your database. Frontend-wise, I'm not sure what you're doing so there's not much I can say, although after the data is collected you can display or do whatever you want with it. -- 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: Model Association and Find
Since HABTM data is constructed as separate SQL statements, and not a JOIN, you cannot add conditions to the query directly. There are ways to get the data you want, though. Check out the example in the book[1] or search Google for "cakephp find habtm data" 1: http://book.cakephp.org/1.3/en/view/1044/hasAndBelongsToMany-HABTM -- 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: CakePHP 2.1-alpha just baked
Here is the 2.1 migraion guide http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html Both "issues" are described there, just update the code accordingly. I think those two ware the only update that are not fully compatible with 2.0 -- 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: CakeEmail: getting error using example from Cake Book
please paste Request controller. Try to call (form Request controller): debug($this->Request); and paste output (http://bin.cakephp.org) -- 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: Problems with Datasources - FIREBIRD
As I can see we are the only ones using this datasource... damn! -- 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: Config\email.php isnt loaded
could you paste more code? -- 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: FormHelper::input() overwrite causes memory exhausted
omg thanks. I tried to backtrace but when i use it in the first line of the new input method it wouldn't look any else ^^ I really appreciate your help. I will solve this by using a helper in a helper instead of extending it. This is the fixed version: http://pastebin.com/TP0X05yU On Jan 8, 7:13 pm, 清水紘己 wrote: > inputs() internally uses input() so infinite loop was caused. > > 2012/1/9 func0der : > > > > > > > > > Hey guys, > > > just tried to create a Translation helper in cakephp 2.0. > > > So i created a TranslationHelper which extends the FormHelper. I > > created a public function named "input" which obviously overwrites the > > input function of the FormHelper. > > > Everytime i call it with $this->Translation->input('Product.name'); in > > a view i get an memory exhausted error and i don't know why. > > > The Code for the TranslationHelper is this:http://pastebin.com/uuZMfCC8 > > > Can anyone explain me why this i happening? > > > Greetings > > func0der > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 > > athttp://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
Re: CakePHP 2.1-alpha just baked
I think they removed all App classes from the core At least the svn diff displays those files now as missing. Seems like it is now necessary to always have own AppController AppModel and AppHelper (for whatever reason^^) On 9 Jan., 12:06, Jeremy Burns | Class Outfit wrote: > Simply by switching from one lib folder to the new one I get this error: > > Fatal error: Class 'AppHelper' not found in > /Volumes/Data/jeremyburns/Sites/_cakes/2_1/lib/Cake/View/Helper/HtmlHelper. > php on line 30 > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 9 Jan 2012, at 10:54:34, euromark wrote: > > > > > > > > > very nice new features :) > > great job > > > PS: only a few minor glitches - for instance somehow the auth > > component (and allow *) doesnt do what it should anymore - trying to > > figure that out right now. > > other than that backwards comp. seems to be fine and former 2.0 apps > > are running perfectly. > > > On 9 Jan., 09:06, Graham Weldon wrote: > >> I for one, welcome our giant orange text overlords. :-) > > >> Cheers, > >> Graham Weldonhttp://grahamweldon.com > >> e. gra...@grahamweldon.com > >> p. (+61) 0407 017 293 > >> Skype: grahamweldon > > >> On Monday, 9 January 2012 at 2:29 PM, José Lorenzo wrote: > > >>> The CakePHP core team is proud to announce the immediate availability of > >>> CakePHP 2.1.0 alpha [1]. Version 2.1 is fully backwards compatible with > >>> 2.0.x release. This means that if you have an app already working in 2.0 > >>> or plan to upgrade one to it, you can safely start using 2.1 right away > >>> and expect no additional work in upgrading. We are very excited about > >>> several enhancements that are part of 2.1 and are working hard to get the > >>> few remaining improvements completed. > > >>> In total, there were over 230 commits and over 15 new features or > >>> enhancements added to CakePHP 2.1. A complete list of the changes can be > >>> viewed in the changelogs page [2]. This is a quick list of this version's > >>> main highlights: > > >>> Content Type Views > > >>> Two new view classes have been added to CakePHP. The new JsonView and > >>> XmlView allow you to more easily generate XML and JSON views. > > >>> By enabling RequestHandlerComponent in your application, and enabling > >>> support for the xml and or jsonextensions, you can automatically leverage > >>> the new view classes. There are two ways you can generate data views. The > >>> first is by using the _serialize key, and the second is by creating > >>> normal view files. > > >>> This makes it super easy to create content-type specific pages and > >>> automatic error responses in the correct mime-types. > > >>> Extending views > > >>> The View class has a new method allowing you to wrap or 'extend' a > >>> view/element/layout with another file. This introduces the ideas of > >>> "sub-layouts" making your views more flexible than ever, this was > >>> implemented using ViewBlocks. > > >>> View blocks are a flexible way to create slots or blocks in your views. > >>> Blocks replace $scripts_for_layout and $content_for_layoutwith a more > >>> robust and flexible API. > > >>> For example blocks are ideal for implementing things such as sidebars, or > >>> regions to load assets at the bottom/top of the layout. > > >>> Plugin.view > > >>> All layout/view/element names can now use Plugin.view to indicate that a > >>> plugin view should be used. The plugin option forView::element() is > >>> deprecated. > > >>> Improved errors > > >>> The debug() function output is now cleaner and more readable. We have > >>> also added interactive stack traces to exception pages. You can click on > >>> each point of the trace to take a peek at the variable state for that > >>> point. Also, as mentioned earlier, CakePHP can now respond with > >>> content-type specific error pages. > > >>> General purpose event system > > >>> A new, generic event system has been built and it replaces the way > >>> callbacks are dispatched. This should not result in any changes to your > >>> code though. You can dispatch your own events and attach callbacks to > >>> them at will. This is useful for inter-plugin communication and > >>> decoupling of your classes through events. > > >>> Testing > > >>> Fixtures can be created in datasources other than $test. Models loaded > >>> using the ClassRegistry and using another datasource will get their > >>> datasource name prepended with test_ (e.g datasource master will try to > >>> use test_master in the testsuite) > > >>> A new TestShell has been added. It reduces the typing required to run > >>> unit tests, and offers a file path based UI:: > > >>> B0x1A6 Console/cake test app/Model/Post.php Console/cake test > >>> app/Controller/PostsController.php > >>> Helpers > >>> tags now work inside elements correctly. > >>> FormHelper now omits disabled fields from the secured fields hash. This > >>> makes working with SecurityComponent and disabled inputs easier
Re: CakePHP 2.1-alpha just baked
Simply by switching from one lib folder to the new one I get this error: Fatal error: Class 'AppHelper' not found in /Volumes/Data/jeremyburns/Sites/_cakes/2_1/lib/Cake/View/Helper/HtmlHelper.php on line 30 Jeremy Burns Class Outfit http://www.classoutfit.com On 9 Jan 2012, at 10:54:34, euromark wrote: > very nice new features :) > great job > > PS: only a few minor glitches - for instance somehow the auth > component (and allow *) doesnt do what it should anymore - trying to > figure that out right now. > other than that backwards comp. seems to be fine and former 2.0 apps > are running perfectly. > > > > On 9 Jan., 09:06, Graham Weldon wrote: >> I for one, welcome our giant orange text overlords. :-) >> >> Cheers, >> Graham Weldonhttp://grahamweldon.com >> e. gra...@grahamweldon.com >> p. (+61) 0407 017 293 >> Skype: grahamweldon >> >> >> >> >> >> >> >> On Monday, 9 January 2012 at 2:29 PM, José Lorenzo wrote: >> >>> The CakePHP core team is proud to announce the immediate availability of >>> CakePHP 2.1.0 alpha [1]. Version 2.1 is fully backwards compatible with >>> 2.0.x release. This means that if you have an app already working in 2.0 or >>> plan to upgrade one to it, you can safely start using 2.1 right away and >>> expect no additional work in upgrading. We are very excited about several >>> enhancements that are part of 2.1 and are working hard to get the few >>> remaining improvements completed. >> >>> In total, there were over 230 commits and over 15 new features or >>> enhancements added to CakePHP 2.1. A complete list of the changes can be >>> viewed in the changelogs page [2]. This is a quick list of this version's >>> main highlights: >> >>> Content Type Views >> >>> Two new view classes have been added to CakePHP. The new JsonView and >>> XmlView allow you to more easily generate XML and JSON views. >> >>> By enabling RequestHandlerComponent in your application, and enabling >>> support for the xml and or jsonextensions, you can automatically leverage >>> the new view classes. There are two ways you can generate data views. The >>> first is by using the _serialize key, and the second is by creating normal >>> view files. >> >>> This makes it super easy to create content-type specific pages and >>> automatic error responses in the correct mime-types. >> >>> Extending views >> >>> The View class has a new method allowing you to wrap or 'extend' a >>> view/element/layout with another file. This introduces the ideas of >>> "sub-layouts" making your views more flexible than ever, this was >>> implemented using ViewBlocks. >> >>> View blocks are a flexible way to create slots or blocks in your views. >>> Blocks replace $scripts_for_layout and $content_for_layoutwith a more >>> robust and flexible API. >> >>> For example blocks are ideal for implementing things such as sidebars, or >>> regions to load assets at the bottom/top of the layout. >> >>> Plugin.view >> >>> All layout/view/element names can now use Plugin.view to indicate that a >>> plugin view should be used. The plugin option forView::element() is >>> deprecated. >> >>> Improved errors >> >>> The debug() function output is now cleaner and more readable. We have also >>> added interactive stack traces to exception pages. You can click on each >>> point of the trace to take a peek at the variable state for that point. >>> Also, as mentioned earlier, CakePHP can now respond with content-type >>> specific error pages. >> >>> General purpose event system >> >>> A new, generic event system has been built and it replaces the way >>> callbacks are dispatched. This should not result in any changes to your >>> code though. You can dispatch your own events and attach callbacks to them >>> at will. This is useful for inter-plugin communication and decoupling of >>> your classes through events. >> >>> Testing >> >>> Fixtures can be created in datasources other than $test. Models loaded >>> using the ClassRegistry and using another datasource will get their >>> datasource name prepended with test_ (e.g datasource master will try to use >>> test_master in the testsuite) >> >>> A new TestShell has been added. It reduces the typing required to run unit >>> tests, and offers a file path based UI:: >> >>> B0x1A6 Console/cake test app/Model/Post.php Console/cake test >>> app/Controller/PostsController.php >>> Helpers >>> tags now work inside elements correctly. >>> FormHelper now omits disabled fields from the secured fields hash. This >>> makes working with SecurityComponent and disabled inputs easier. >>> The between option when used in conjunction with radio inputs, now behaves >>> differently. The between value is now placed between the legend and first >>> input elements. >>> The hiddenField option with checkbox inputs can now be set to a specific >>> value such as 'N' rather than just 0. >>> The for attribute for date + time inputs now reflects the first generated >>> i
Re: CakePHP 2.1-alpha just baked
very nice new features :) great job PS: only a few minor glitches - for instance somehow the auth component (and allow *) doesnt do what it should anymore - trying to figure that out right now. other than that backwards comp. seems to be fine and former 2.0 apps are running perfectly. On 9 Jan., 09:06, Graham Weldon wrote: > I for one, welcome our giant orange text overlords. :-) > > Cheers, > Graham Weldonhttp://grahamweldon.com > e. gra...@grahamweldon.com > p. (+61) 0407 017 293 > Skype: grahamweldon > > > > > > > > On Monday, 9 January 2012 at 2:29 PM, José Lorenzo wrote: > > > The CakePHP core team is proud to announce the immediate availability of > > CakePHP 2.1.0 alpha [1]. Version 2.1 is fully backwards compatible with > > 2.0.x release. This means that if you have an app already working in 2.0 or > > plan to upgrade one to it, you can safely start using 2.1 right away and > > expect no additional work in upgrading. We are very excited about several > > enhancements that are part of 2.1 and are working hard to get the few > > remaining improvements completed. > > > In total, there were over 230 commits and over 15 new features or > > enhancements added to CakePHP 2.1. A complete list of the changes can be > > viewed in the changelogs page [2]. This is a quick list of this version's > > main highlights: > > > Content Type Views > > > Two new view classes have been added to CakePHP. The new JsonView and > > XmlView allow you to more easily generate XML and JSON views. > > > By enabling RequestHandlerComponent in your application, and enabling > > support for the xml and or jsonextensions, you can automatically leverage > > the new view classes. There are two ways you can generate data views. The > > first is by using the _serialize key, and the second is by creating normal > > view files. > > > This makes it super easy to create content-type specific pages and > > automatic error responses in the correct mime-types. > > > Extending views > > > The View class has a new method allowing you to wrap or 'extend' a > > view/element/layout with another file. This introduces the ideas of > > "sub-layouts" making your views more flexible than ever, this was > > implemented using ViewBlocks. > > > View blocks are a flexible way to create slots or blocks in your views. > > Blocks replace $scripts_for_layout and $content_for_layoutwith a more > > robust and flexible API. > > > For example blocks are ideal for implementing things such as sidebars, or > > regions to load assets at the bottom/top of the layout. > > > Plugin.view > > > All layout/view/element names can now use Plugin.view to indicate that a > > plugin view should be used. The plugin option forView::element() is > > deprecated. > > > Improved errors > > > The debug() function output is now cleaner and more readable. We have also > > added interactive stack traces to exception pages. You can click on each > > point of the trace to take a peek at the variable state for that point. > > Also, as mentioned earlier, CakePHP can now respond with content-type > > specific error pages. > > > General purpose event system > > > A new, generic event system has been built and it replaces the way > > callbacks are dispatched. This should not result in any changes to your > > code though. You can dispatch your own events and attach callbacks to them > > at will. This is useful for inter-plugin communication and decoupling of > > your classes through events. > > > Testing > > > Fixtures can be created in datasources other than $test. Models loaded > > using the ClassRegistry and using another datasource will get their > > datasource name prepended with test_ (e.g datasource master will try to use > > test_master in the testsuite) > > > A new TestShell has been added. It reduces the typing required to run unit > > tests, and offers a file path based UI:: > > > B0x1A6 Console/cake test app/Model/Post.php Console/cake test > > app/Controller/PostsController.php > > Helpers > > tags now work inside elements correctly. > > FormHelper now omits disabled fields from the secured fields hash. This > > makes working with SecurityComponent and disabled inputs easier. > > The between option when used in conjunction with radio inputs, now behaves > > differently. The between value is now placed between the legend and first > > input elements. > > The hiddenField option with checkbox inputs can now be set to a specific > > value such as 'N' rather than just 0. > > The for attribute for date + time inputs now reflects the first generated > > input. This may result in the for attribute changing for generated datetime > > inputs. > > > Callback prioirites > > > Callbacks for Helpers, Behaviors, and Components now support priorities, > > this helps more easily control the order in which callbacks are fired. > > > We are working towards making the 2.1 book online in the next few hours and > > plan to finish the remaining features very
Re: Can not change default Model and fields :(
Hi, After spending 2 days, finally I've found why it was not working. In /lib/Cake/Controller/Component/Auth/FormAuthenticate.php on line number 61,61 and 67,68 it is trying to access the undifined "$fields['username'] and "$fields['password'] index it should be only ['username'] and ['password']. on line number 61 and 62 Just replace empty($request->data[$model][$fields['username']]) || empty($request->data[$model][$fields['password']]) With empty($request->data[$model]['username']) || empty($request- >data[$model]['password']) And on line number 67 ,68 replace $request->data[$model][$fields['username']], $request- >data[$model][$fields['password']] with $request->data[$model]['username'],$request->data[$model] ['password'] And for changing the model if you set $model='User' on line number 55 you can use the any other model than default User. That's it and you are done Will appreciate If anyone can modify it in cakaPHP ways... Thanks Vaibhav On Jan 6, 2:17 pm, "vaibhav.malushte" wrote: > Hi, > > I've followed the steps to set-up Auth component (cakaphp 2.0), but > no luck so far, bellow is my configuration > > in AppController :- > > public $components = array( > 'Session', > 'Security', > 'Auth' => array( > 'loginAction' => array('controller' => 'users','action' => > 'login'), //this set the login controller and the action > 'authenticate' => array( > > 'Form' => array( > > 'userModel' => 'User', > > 'scope'=>array('User.is_active' => 0), > > 'fields' => array('username' => 'username','password'=>'password') > ) > ), > 'loginRedirect' => array('controller' => > 'maildirect_home', 'action' => 'index'), > 'logoutRedirect' => array('controller' => > 'maildirect_home', 'action' => 'loggedout') > ) > ); > > public function beforeFilter() { > parent::beforeFilter(); > > } > > > in User (model) : - > App::uses('AuthComponent', 'Controller/Component'); > > class User extends AppModel { > > public $name = 'Client'; > public $useTable = 'clients_users'; // I'm using different table} > > > in View :-- > > Session->flash('auth'); ?> > Form->create('User');?> > > password'); ?> > echo $this->Form->input('username'); > echo $this->Form->input('password'); > ?> > > Form->end(__('Login'));?> > > > > in UserController :- > > class UsersController extends AppController { > > public function beforeFilter() { > parent::beforeFilter(); > //$this->Auth->allow('add', 'logout', 'loggedout'); > } > > public function login() { > if ($this->Auth->login()) { > $this->redirect($this->Auth->redirect()); > } else { > $this->Session->setFlash(__('Invalid username or password, > try again')); > } > } > > public function logout() { > $this->redirect($this->Auth->logout()); > } > > } > > > > Now I want to change the default model to my own model, First I've > change "'userModel' => 'User'" to 'userModel' => 'Client'" no luck > then I tried $this->Auth->userModel = 'Client'; but same result. > If I change the model name it redirect me to a login page with no > query executed in debug console. > > Also I've tried to change the default fields name as 'fields' => > array('username' => 'username','password'=>'password') to 'fields' => > array('username' => 'user_name','password'=>'user_password'). This > also not working. > It gives me error column "username" not found in table (it's obvious, > there no filed "username", I've change it to "user_name") > > I don't understand where I'm wrong :( > > Please correct me if I'm doing anything wrong > > Thanks and happy new year > Vaibhav -- 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: Can not change default Model and fields :(
On Jan 9, 9:53 am, "vaibhav.malushte" wrote: > Hi, > > After spending 2 days, finally I've found why it was not working. > > In /lib/Cake/Controller/Component/Auth/FormAuthenticate.php on line > number 61,61 and 67,68 it is trying to access the undifined > "$fields['username'] and "$fields['password'] index > it should be only ['username'] and ['password']. Those keys are always set (See BaseAuthenticate settings property) - That means you've somehow managed to configure the auth component to effectively unset them. > > Just replace > empty($request->data[$model][$fields['username']]) || > empty($request->data[$model][$fields['password']]) > With > empty($request->data[$model][['username']) || > empty($request->data[$model]['password']) > > and you are done You mean edit the core files? Don't. Do. That. Either it's a bug and it needs fixing, or there's an error in your code. Given there are tests covering this core component's usage, it's quite likely the latter. It's hard to read your code; but if you were able to find the error - I trust you're also able to find where you're overwriting the settings array to remove the keys the code relies upon to work. AD -- 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: Can not change default Model and fields :(
Hi, After spending 2 days, finally I've found why it was not working. In /lib/Cake/Controller/Component/Auth/FormAuthenticate.php on line number 61,61 and 67,68 it is trying to access the undifined "$fields['username'] and "$fields['password'] index it should be only ['username'] and ['password']. Just replace empty($request->data[$model][$fields['username']]) || empty($request->data[$model][$fields['password']]) With empty($request->data[$model][['username']) || empty($request- >data[$model]['password']) and you are done Thanks Vaibhav On Jan 6, 2:17 pm, "vaibhav.malushte" wrote: > Hi, > > I've followed the steps to set-up Auth component (cakaphp 2.0), but > no luck so far, bellow is my configuration > > in AppController :- > > public $components = array( > 'Session', > 'Security', > 'Auth' => array( > 'loginAction' => array('controller' => 'users','action' => > 'login'), //this set the login controller and the action > 'authenticate' => array( > > 'Form' => array( > > 'userModel' => 'User', > > 'scope'=>array('User.is_active' => 0), > > 'fields' => array('username' => 'username','password'=>'password') > ) > ), > 'loginRedirect' => array('controller' => > 'maildirect_home', 'action' => 'index'), > 'logoutRedirect' => array('controller' => > 'maildirect_home', 'action' => 'loggedout') > ) > ); > > public function beforeFilter() { > parent::beforeFilter(); > > } > > > in User (model) : - > App::uses('AuthComponent', 'Controller/Component'); > > class User extends AppModel { > > public $name = 'Client'; > public $useTable = 'clients_users'; // I'm using different table} > > > in View :-- > > Session->flash('auth'); ?> > Form->create('User');?> > > password'); ?> > echo $this->Form->input('username'); > echo $this->Form->input('password'); > ?> > > Form->end(__('Login'));?> > > > > in UserController :- > > class UsersController extends AppController { > > public function beforeFilter() { > parent::beforeFilter(); > //$this->Auth->allow('add', 'logout', 'loggedout'); > } > > public function login() { > if ($this->Auth->login()) { > $this->redirect($this->Auth->redirect()); > } else { > $this->Session->setFlash(__('Invalid username or password, > try again')); > } > } > > public function logout() { > $this->redirect($this->Auth->logout()); > } > > } > > > > Now I want to change the default model to my own model, First I've > change "'userModel' => 'User'" to 'userModel' => 'Client'" no luck > then I tried $this->Auth->userModel = 'Client'; but same result. > If I change the model name it redirect me to a login page with no > query executed in debug console. > > Also I've tried to change the default fields name as 'fields' => > array('username' => 'username','password'=>'password') to 'fields' => > array('username' => 'user_name','password'=>'user_password'). This > also not working. > It gives me error column "username" not found in table (it's obvious, > there no filed "username", I've change it to "user_name") > > I don't understand where I'm wrong :( > > Please correct me if I'm doing anything wrong > > Thanks and happy new year > Vaibhav -- 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: CakePHP 2.1-alpha just baked
I for one, welcome our giant orange text overlords. :-) Cheers, Graham Weldon http://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293 Skype: grahamweldon On Monday, 9 January 2012 at 2:29 PM, José Lorenzo wrote: > > The CakePHP core team is proud to announce the immediate availability of > CakePHP 2.1.0 alpha [1]. Version 2.1 is fully backwards compatible with 2.0.x > release. This means that if you have an app already working in 2.0 or plan to > upgrade one to it, you can safely start using 2.1 right away and expect no > additional work in upgrading. We are very excited about several enhancements > that are part of 2.1 and are working hard to get the few remaining > improvements completed. > > > In total, there were over 230 commits and over 15 new features or > enhancements added to CakePHP 2.1. A complete list of the changes can be > viewed in the changelogs page [2]. This is a quick list of this version's > main highlights: > > Content Type Views > > Two new view classes have been added to CakePHP. The new JsonView and XmlView > allow you to more easily generate XML and JSON views. > > > By enabling RequestHandlerComponent in your application, and enabling support > for the xml and or jsonextensions, you can automatically leverage the new > view classes. There are two ways you can generate data views. The first is by > using the _serialize key, and the second is by creating normal view files. > > > This makes it super easy to create content-type specific pages and automatic > error responses in the correct mime-types. > > Extending views > > The View class has a new method allowing you to wrap or 'extend' a > view/element/layout with another file. This introduces the ideas of > "sub-layouts" making your views more flexible than ever, this was implemented > using ViewBlocks. > > > View blocks are a flexible way to create slots or blocks in your views. > Blocks replace $scripts_for_layout and $content_for_layoutwith a more robust > and flexible API. > > > For example blocks are ideal for implementing things such as sidebars, or > regions to load assets at the bottom/top of the layout. > > Plugin.view > > All layout/view/element names can now use Plugin.view to indicate that a > plugin view should be used. The plugin option forView::element() is > deprecated. > > Improved errors > > The debug() function output is now cleaner and more readable. We have also > added interactive stack traces to exception pages. You can click on each > point of the trace to take a peek at the variable state for that point. Also, > as mentioned earlier, CakePHP can now respond with content-type specific > error pages. > > General purpose event system > > A new, generic event system has been built and it replaces the way callbacks > are dispatched. This should not result in any changes to your code though. > You can dispatch your own events and attach callbacks to them at will. This > is useful for inter-plugin communication and decoupling of your classes > through events. > > Testing > > Fixtures can be created in datasources other than $test. Models loaded using > the ClassRegistry and using another datasource will get their datasource name > prepended with test_ (e.g datasource master will try to use test_master in > the testsuite) > > > A new TestShell has been added. It reduces the typing required to run unit > tests, and offers a file path based UI:: > > B0x1A6 Console/cake test app/Model/Post.php Console/cake test > app/Controller/PostsController.php > Helpers > tags now work inside elements correctly. > FormHelper now omits disabled fields from the secured fields hash. This makes > working with SecurityComponent and disabled inputs easier. > The between option when used in conjunction with radio inputs, now behaves > differently. The between value is now placed between the legend and first > input elements. > The hiddenField option with checkbox inputs can now be set to a specific > value such as 'N' rather than just 0. > The for attribute for date + time inputs now reflects the first generated > input. This may result in the for attribute changing for generated datetime > inputs. > > Callback prioirites > > Callbacks for Helpers, Behaviors, and Components now support priorities, this > helps more easily control the order in which callbacks are fired. > > > We are working towards making the 2.1 book online in the next few hours and > plan to finish the remaining features very soon. Thanks to the ever-growing > CakePHP community for the patches, documentation changes and new tickets. > Without you there would be no CakePHP! > > Download a packaged release [1] > View the changelog [2] > > Links > [1] http://github.com/cakephp/cakephp > [2] http://cakephp.org/changelogs/2.1.0-alpha > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check o