POST and PUT problems on add action
I'm new to cakephp and I'm start loving it but today I had a problem on adding new data (action add). After baking users table the result was public function add() { if ( $this->request->is('post') ) { I had add some validation on my model to names and more fields. The first push on submit button show invalid validation messages but on second click on submit did nothing. I found that the $this->request->is('post') becomes false after first submit. I look on edit action and I see that also ask for put. to solve this problem all I had to do was public function add() { if ( $this->request->is('post') || $this->request->is('put') ) { It's working fine now for me and to to solve it on every baking I personalized my baking template on my project app/Console/Templates/myTemplate/actions/controller_actions.ctp I really don't know if this is the correct way to solve it, I've never used PUT on PHP apps that I made and I don't see a big difference either way. I comment this because I don't know if is a bug on cake (tested on version: 2.3.1 - 2.3.3 ). I hope this information helps and also I hope to see some comments to understand a little bit more. tags: flash session message validation post put -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Update from Cakephp 2.3.0 to 2.3.1
Yes, replacing the lib folder should be enough. what I do, is to organize the cake version I use on one folder. Then I make a junction from my app directory to the lib folder. Junction it's like a symlink on *nix. So upgrade or downgrade from a different version of cake, only takes a second. On the other hand, it allows me to have only one single copy of cake for my different apps. El jueves, 14 de marzo de 2013 19:56:39 UTC-3, cricket escribió: > > On Wed, Mar 13, 2013 at 11:51 AM, kaiszy > > > wrote: > > Hi again ;) > > > > Sorry for my fuzzy mail ;) > > > > For example i modify > > > >cakeroot/app/Controller/AppController.php > >cakeroot/app/View/Layouts/defaults.ctp > >a.s.o. > > > > These files are (ofcourse ;) also in then distribution archiv. > > Do you mean your project's root, or the lib folder? It can be > confusing because there's a: > > lib/Cake/Controller/AppController.php > > and: > > app/Controller/AppController.php > > Both app and lib should be at the same level. > > The files in app are the ones you should modify. Don't make changes to > anything in lib. > > > So i ask myself: What is the best practice to update Cakephp > Installations > > (maybe compare app-File-by-file), > > If the lib folder is untouched you're good to go. Download the version > you want and replace the lib folder. (Re-name the old one so you can > easily switch back.) You can also do this with git but if you're not > sure it's best to do it manually. > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: how to implement Smarty 3?
Lorenzo, I do not fully understand your answer. and I'm sure it's because my limited knowledge about cake. I'm not already familiarized with cake structure. Can you gave me a hint where do I have to load smarty ( I mean in wich file I must include smarty, and where to instantiate it). What it this "simple vendor layer"? Thanks a lot El jueves, 29 de noviembre de 2012 08:18:43 UTC-3, lorenzoshake escribió: > > > > Il giorno sabato 17 novembre 2012 15:21:56 UTC+1, Martin Aguilar ha > scritto: >> >> For years I've been working on my own framework but now I wan't to >> migrate to cakephp. >> On my framework I used smarty for themes and to separate code from views. >> I always find smarty clean, nice and with a very good performance. >> Now I want to use it on cake but I found people saying that it has no >> purpose. >> And couldn't find a good article about implementing it. The only thing >> that I found it's for cake 1.3 and smarty 2 and the article it's damage. >> >> http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyviewOn >> point 4, I see a lot of unreadable symbols. >> >> Any help on implementing smarty 3 on cake 2? >> What it's your opinion onimplementing smarty or any other template system? >> >> Hi martin, when i use smarty inside cake i use a simple vendor layer that > wrap smarty where i can set/manage variables > Set autorender to false and use smarty as usual > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: how to implement Smarty 3?
Correct me if I am wrong. Bootstrap looks nice but it's not comparable with Smarty for what I could see. In fact, both of them can be combined. I choose smarty because I can take some limit control on giving themes to users or clients. Good cache administration, fast rendering, clean code over php tags for printing messages or binding data. vs {$something} Angular also has a different purpose. Thank's for the answer, I will take a good and deep look into these two frameworks. Even though It's not what I'm looking for right now. El domingo, 18 de noviembre de 2012 22:05:19 UTC-3, romel javier gomez herrera escribió: > > hi, > > for cool views can use this framework http://twitter.github.com/bootstrap/ > and cakephp views. > > And check this to http://angularjs.org/ > > regards > > 2012/11/17 Martin Aguilar > > >> For years I've been working on my own framework but now I wan't to >> migrate to cakephp. >> On my framework I used smarty for themes and to separate code from views. >> I always find smarty clean, nice and with a very good performance. >> Now I want to use it on cake but I found people saying that it has no >> purpose. >> And couldn't find a good article about implementing it. The only thing >> that I found it's for cake 1.3 and smarty 2 and the article it's damage. >> >> http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyviewOn >> point 4, I see a lot of unreadable symbols. >> >> Any help on implementing smarty 3 on cake 2? >> What it's your opinion on implementing smarty or any other template >> system? >> >> Thanks a lot >> >> -- >> 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 post to this group, send email to cake...@googlegroups.com >> . >> To unsubscribe from this group, send email to >> cake-php+u...@googlegroups.com . >> Visit this group at http://groups.google.com/group/cake-php?hl=en. >> >> >> > > -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
how to implement Smarty 3?
For years I've been working on my own framework but now I wan't to migrate to cakephp. On my framework I used smarty for themes and to separate code from views. I always find smarty clean, nice and with a very good performance. Now I want to use it on cake but I found people saying that it has no purpose. And couldn't find a good article about implementing it. The only thing that I found it's for cake 1.3 and smarty 2 and the article it's damage. http://bakery.cakephp.org/articles/tclineks/2006/10/27/how-to-use-smarty-with-cake-smartyviewOn point 4, I see a lot of unreadable symbols. Any help on implementing smarty 3 on cake 2? What it's your opinion on implementing smarty or any other template system? Thanks a lot -- 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 post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.