can't save via ajax

2012-03-16 Thread luca capra
Hi, I got a form loaded via ajax request, then posted via ajax too on 2.1 The data is saved in the database but save() method return false. What could be the cause? Thank you -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP

Re: can't save via ajax

2012-03-16 Thread Allan Douglas
Show the action code. 2012/3/16 luca capra luca.ca...@gmail.com: Hi, I got a form loaded via ajax request, then posted via ajax too on 2.1 The data is saved in the database but save() method return false. What could be the cause? Thank you -- Our newest site for the community: CakePHP

Element rendering plugin view

2012-03-16 Thread  Fabiano
I'm using User Management Plugin. My default layout has an element that I wanna to render one plugin's view (login.ctp). How can i get it done? Thx for help! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site

How can I use Model in Component? Is it possibly?

2012-03-16 Thread Dave Modis
Actually I need to read and write some data in database by using component. If it impossibly, can I use Controller in Component like Controller use Component (returning result of method)? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: generateTreeList starting from an id

2012-03-16 Thread gimmebucks
What i always do is get the node lft and rght value. then set conditions array('Model.lft ' = $node['lft'],'Model.rght ' = $node['rght']) to include the node, substitute with = and with = On Mar 16, 12:06 am, Ernesto e.fanz...@gmail.com wrote: i forgot to say i've already tried the conditions

Re: PDF Excel generation in CakePHP 2.0

2012-03-16 Thread gimmebucks
for pdf, you can use pdf library such as mfpdf that convert html to pdf. for excel(csv) you can use php built-in csv function, fputcsv On Mar 16, 12:36 pm, konda guthakond...@gmail.com wrote: Thanks to all. I want to generate reports using PDF and Excel format. Please help me how can I

Re: can't save via ajax

2012-03-16 Thread luca capra
Hi, I found that the action is called twice on server side. The model has been purged of any relation and callback methods and validation options. Some day ago I either asked about an error with $this-redirect(), which is still present. It causes a Controller `Controller` missing, but maybe a

Re: Element rendering plugin view

2012-03-16 Thread Tilen Majerle
http://book.cakephp.org/2.0/en/views.html#elements -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/3/16  Fabiano fsa...@gmail.com I'm using User Management Plugin. My default layout has an element that I wanna to render one plugin's view (login.ctp). How can i get it done? Thx

Limit hasMany Comments to Post it belongs to?

2012-03-16 Thread Godfried
Hi all, If CakePhp would be like ASP.NET Entity Framework, the following statement would find all the Comments related to a Post with id = 1: //doesnt work $this-Post-id = 1; $result = $this-Post-Comments; //doesnt work either $this-Post-id = 1; $result = $this-Post-Comment-find('all');

Upgrading to 2.1

2012-03-16 Thread rainerpl
Hi Could somebody point me to a tutorial on how to upgrade from 2.0 to 2.1 I searched the cakePHP site and didnt find any instructions. The only thing i could find was for version 1.2 or so, and it said that replacing the whole lib folder with newer version would pretty much do it. But there is

Re: Limit hasMany Comments to Post it belongs to?

2012-03-16 Thread Jeremy Burns | Class Outfit
$result = $this-Post-Comment-find( 'all', array( 'conditions' = array( 'Comment.post_id' = 1 ) ) ); Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Mar 2012, at 14:33:25, Godfried wrote: Hi all, If

Re: Limit hasMany Comments to Post it belongs to?

2012-03-16 Thread Godfried Meesters
Thanks, so I note that the intuitive solution, like in ASP.NET, is not possible in CakePHP? Op 16 maart 2012 16:04 heeft Jeremy Burns | Class Outfit jeremybu...@classoutfit.com het volgende geschreven: $result = $this-Post-Comment-find( 'all', array( 'conditions' = array( 'Comment.post_id' =

Re: Limit hasMany Comments to Post it belongs to?

2012-03-16 Thread Jeremy Burns | Class Outfit
What's your point? This is PHP, not ASP.net. Jeremy Burns Class Outfit http://www.classoutfit.com On 16 Mar 2012, at 15:07:29, Godfried Meesters wrote: Thanks, so I note that the intuitive solution, like in ASP.NET, is not possible in CakePHP? Op 16 maart 2012 16:04 heeft Jeremy Burns |

Re: Limit hasMany Comments to Post it belongs to?

2012-03-16 Thread Godfried Meesters
My point is, it would be more intuitive to have Post.Comments return the Comments related to that Post. If I'm correct this is also like this in Java Hibernate framework. Op 16 maart 2012 16:10 heeft Jeremy Burns | Class Outfit jeremybu...@classoutfit.com het volgende geschreven: What's your

Re: Upgrading to 2.1

2012-03-16 Thread Miles J
You should probably do the 1.x - 2.0 first then the 2.0 - 2.1. http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html On Friday, March 16, 2012 7:53:39 AM UTC-7, rainerpl wrote: Hi Could somebody point me to a

Media Plugin begginer problems....

2012-03-16 Thread avairet
Hi, I'm trying to use David Person's Media Plugin with an hasMany association and it doesn't work... My environment: - Win XP - CakePHP 1.3.14 - PHP 5.3.8 - Media Plugin 1.3 Media plugin is in my App/plugins directory. In my config/boostrap.php, I have: require

Re: Paginate a containable association

2012-03-16 Thread Alan Wagstaff
I decided to split the loading of Topic and Posts in to 2 separate calls. It will fix this pagination issue and allow me to do selective individual caching on posts as needed. For anyone who has a similar issue, my new code: Topics Controller: public $paginate = array( 'forTopic', 'paramType'

Re: CakePHP 2.1 Submits Duplicate Array Values

2012-03-16 Thread Travis
I'm still seeing this same behavior with the latest code but in a slightly different context. I'm using Cakephp 2.1 as a backend to an Android app. When I post an array from the Android app cake gives me all duplicated values in $this-request-data as Jeremy explained above. However if I post an

how to send in email the array of select field in a form

2012-03-16 Thread ashok saini
I can get value of select field by Teacher mdash; ?=$this-data['Quest']['prof_id']? but how to get array? The form contains ?=$form-select(prof_id,$profs,null,array(style = width:80%))? The table where form data is stored has prof_id. The $profs comes from another table where id and name (fio) is

Share session with Magento

2012-03-16 Thread Luchi
Hi, Basically, what I want to do is to share my frontend session of Magento to an application deployed in CakePHP. The structures are: public_html/ /appmagento /appcakephp Anyone nows or has an experience trying this. Regards, -- Our newest site for the community: CakePHP Video

Share session with Magento

2012-03-16 Thread Luchi
Hi, Basically what I want to do is to share my frontend session of Magento to an application deployed in CakePHP. The structures are: public_html/ /appmagento /appcakephp Anyone nows or has an experience trying this. Regards, Luciano -- Our newest site for the community: CakePHP

Re: if i delete webroot/htaccss for debuging in eclipse,Internal Server Error!

2012-03-16 Thread Joey
I probably put 40 - 60 hours of time and trying to get debugging with Eclipse PDT working without any success... In the end, I went out and bought PHP Storm, enabling debugging took 10 minutes. Literaly. Go buy it, it's worth it, it will change your life. It is worth EVERY penny. :) Joey On