Jquery and css issues with IE7
I am making my first website using cakephp. During development I tested it on firefox, ie8, chrome, opera. One of my recently ran it on IE7 and to my surprise most of the layout is distorted. Also from my initial analysis I noticed that in jquery css and html functions are not working well. Has anybody else faced same issue? Can someone please suggest if this is the expected behaviour and what stepsto take to correct it and avoid it in future? Thank you and Regards Rajat -- 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: Using Pages
you don't need to create an action just view domain.com/pages/test Andras Kende On Jun 15, 2011, at 10:49 PM, brandon buster wrote: > I'm just trying to run a quick and dirty test on my site and I thought > it would be best to use pages for it. > > I've created a page called test.ctp in the views/pages folder and a > new action called test in the pages controller. > > But I keep getting a page not found error. > > Am I missing anything? > > -- > 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: Load models without model files
Make stub model with $useTable = false, load it, then call $this- >setSource('table_name') on it. Or list all "static" models in AppModel, overwrite __construct() there and set $useTable to false there for any not listed name. On 16 июн, 02:49, "qua...@gmail.com" wrote: > Hi, > > I have tables that are created on the fly and I'd like to access it > thru Model. Since those tables are dynamically created, I don't have > the model .php files for them. The tables are created conforming to > Cake's naming convention. I tried to use loadModel() to load them but > Cake still complains that the tables are missing. > > Is there a solution for it? > > Thank you. -- 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
I need example for this
I create the Article and New and comment for both in my project and I try to search for example I found blog tutorial but example without session when add comment I need to add username avartar such as genaral website what should I do -- 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
Using Pages
I'm just trying to run a quick and dirty test on my site and I thought it would be best to use pages for it. I've created a page called test.ctp in the views/pages folder and a new action called test in the pages controller. But I keep getting a page not found error. Am I missing anything? -- 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 get the database name from a Model?
$databaseName = $this->getDataSource()->config['database']; On 16 июн, 00:06, Celso wrote: > Hi ! > How get the database name from a Model? > > Because the $useDbConfig returns only the name of config.. > > thanks, > celso -- 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 get the database name from a Model?
i would go for $this->tablePrefix.$this->table prefix you would need if you used in your config tip: use a proper IDE which auto-completion this will show you the available names/fields inside your model On 15 Jun., 19:07, Tilen Majerle wrote: > $useTable > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/6/15 Celso > > > > > > > > > Hi ! > > How get the database name from a Model? > > > Because the $useDbConfig returns only the name of config.. > > > thanks, > > celso > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://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
Silent Mode on MYSQL Errors
Currently the default behavior of any cake site if the database goes down is simply to function normally - without the data of course. this causes a lot of confusion among the users. they see all the static content of the page, the dynamic database loaded content is gone. they try to login but fail. this happened now twice and i got hundreds of mails why their password is not working anymore... simply because they couldn't have known that the DB crashed because there was no message that there is some malfunction. of course my log files get fuller and fuller (50-100 MB in hours) but with debug=0 the user will not get any of this information. does anyone know a simple solution on how to trigger an app error in those cases (DB down, not available) etc which can then display a more meaningful error message like "server is not available at the moment" or whatever? :) it then would use its own layout (not the dynamic content layout which misses all kinds of vital information). thx in advance PS: i kinda think the default behavior is not the right way to go here... would a change be appropriate? similar to a 404 this should error by default. -- 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: Easy Query Seems Difficult to Fire
INNER was the word I needed to remember to get an alternative to work. For other people here's what the end query (which returns the same as the above query) turned out to be. SELECT `Contact`.`id`, `Contact`.`name` FROM `contacts` AS `Contact` INNER JOIN contact_companies AS `ContactCompany` ON (`ContactCompany`.`contact_id` = `Contact`.`id`) WHERE 1 = 1 ORDER BY `Contact`.`name` ASC and the Cakephp way is (in my Contact model) $this->find('list', array( 'joins' => array(array( 'table' => 'contact_companies', 'alias' => 'ContactCompany', 'type' => 'INNER', 'conditions' => array( 'ContactCompany.contact_id = Contact.id', ), )), 'order' => 'Contact.name')); (I typed that out, so don't shoot me if I'm missing a parenthesis or something) On Jun 15, 4:46 pm, Zuha wrote: > Close... select where we only pull back contacts where the company > belongsTo contact > > On Jun 15, 3:00 pm, Jeremy Burns | Class Outfit > > > > > > > > wrote: > > Are you trying to do an inner join where you only pull back contacts who > > belong to a company? > > > Jeremy Burns > > Class Outfit > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > On 15 Jun 2011, at 17:44, Zuha wrote: > > > > Seems like this should be easy, and maybe I'm just missing how to do > > > it, but I want to execute the following query. [preferrably using > > > find('list')] > > > > SELECT `Contact`.`id`, `Contact`.`name` FROM `contacts` AS `Contact`, > > > `contact_companies` AS `ContactCompany` WHERE `Contact`.`id` = > > > `ContactCompany`.`contact_id` ORDER BY `Contact`.`name` ASC > > > > ContactCompany belongsTo Contact > > > > That query returns the exact information I want, but without query(), > > > I don't see how to do it. > > > > -- > > > Our newest site for the community: CakePHP Video > > > Tutorialshttp://tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > > 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: Easy Query Seems Difficult to Fire
Close... select where we only pull back contacts where the company belongsTo contact On Jun 15, 3:00 pm, Jeremy Burns | Class Outfit wrote: > Are you trying to do an inner join where you only pull back contacts who > belong to a company? > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 15 Jun 2011, at 17:44, Zuha wrote: > > > > > > > > > Seems like this should be easy, and maybe I'm just missing how to do > > it, but I want to execute the following query. [preferrably using > > find('list')] > > > SELECT `Contact`.`id`, `Contact`.`name` FROM `contacts` AS `Contact`, > > `contact_companies` AS `ContactCompany` WHERE `Contact`.`id` = > > `ContactCompany`.`contact_id` ORDER BY `Contact`.`name` ASC > > > ContactCompany belongsTo Contact > > > That query returns the exact information I want, but without query(), > > I don't see how to do it. > > > -- > > 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
Load models without model files
Hi, I have tables that are created on the fly and I'd like to access it thru Model. Since those tables are dynamically created, I don't have the model .php files for them. The tables are created conforming to Cake's naming convention. I tried to use loadModel() to load them but Cake still complains that the tables are missing. Is there a solution for it? Thank you. -- 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: Easy Query Seems Difficult to Fire
Are you trying to do an inner join where you only pull back contacts who belong to a company? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jun 2011, at 17:44, Zuha wrote: > Seems like this should be easy, and maybe I'm just missing how to do > it, but I want to execute the following query. [preferrably using > find('list')] > > SELECT `Contact`.`id`, `Contact`.`name` FROM `contacts` AS `Contact`, > `contact_companies` AS `ContactCompany` WHERE `Contact`.`id` = > `ContactCompany`.`contact_id` ORDER BY `Contact`.`name` ASC > > ContactCompany belongsTo Contact > > That query returns the exact information I want, but without query(), > I don't see how to do 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: Validating HABTM
You should check this: http://bakery.cakephp.org/articles/nachopitt/2010/07/01/habtm-validatable-behavior On 15 jun, 08:24, Shaz wrote: > I haven't actually made models for the Join table - I don't think you > need to for a HABTM relationship > > On Jun 15, 1:41 pm, Rob Maurer wrote: > > > > > > > > > Interesting. What would happen if you put the validation in the model > > for the join table? > > > On Jun 14, 3:17 pm, Shaz wrote: > > > > I can - but in that arises another situation: > > > > I also have Location HABT Language - and I don't want any restrictions > > > there. So a location can have more than 3 or no languages associated > > > with it. > > > > So if place the above $validate in language model, both users and > > > locations will need to pass that validation; where I only want the > > > users to... > > > > Thanks! > > > > On Jun 14, 8:14 pm, hunny wrote: > > > > > Write the Validation Rule in Language Model instead of User Model > > > > > On Jun 14, 9:56 pm, Shaz wrote: > > > > > > I have User HABTM Language, and i want to ensure during a User add / > > > > > edit they choose a minimum of one language, upto a maximum of 3. In > > > > > the user model, for $validate I've tried: > > > > > > 'Language' => array( > > > > > 'multiple' => array( > > > > > 'rule' => array('multiple', > > > > > array('min' => 1, 'max' => 3)), > > > > > 'message' => 'Please select a tleast > > > > > 1 langiage upto a maximum of > > > > > 3' > > > > > ), > > > > > ), > > > > > > And in the add/edit form i have $this->Form->input('Language'); which > > > > > doesn't actually validate. > > > > > > It does work if I use language_id instead of Language (both in the > > > > > form on the add/edit pages and in the model $validate) - but then it > > > > > doesn't save any data in the join table. > > > > > > Any advice on getting the above to validate, or save habtm when using > > > > > "_id". -- 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
Easy Query Seems Difficult to Fire
Seems like this should be easy, and maybe I'm just missing how to do it, but I want to execute the following query. [preferrably using find('list')] SELECT `Contact`.`id`, `Contact`.`name` FROM `contacts` AS `Contact`, `contact_companies` AS `ContactCompany` WHERE `Contact`.`id` = `ContactCompany`.`contact_id` ORDER BY `Contact`.`name` ASC ContactCompany belongsTo Contact That query returns the exact information I want, but without query(), I don't see how to do 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: How get the database name from a Model?
$useTable -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/6/15 Celso > Hi ! > How get the database name from a Model? > > Because the $useDbConfig returns only the name of config.. > > thanks, > celso > > -- > 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
How get the database name from a Model?
Hi ! How get the database name from a Model? Because the $useDbConfig returns only the name of config.. thanks, celso -- 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
After failed validation, make captcha text field empty
Hi, when I have a failed validation, my form reloads and I see the old captcha code in my text field. How can I have this field empty again, in case I have to reload after a failed validation? 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: Flash Session Variable
Or instead of reinventing the wheel just using it the way it is supposed to be used in the first place? http://www.jamesfairhurst.co.uk/posts/view/custom_cakephp_flash_messages_updated/ On 15 jun, 09:38, Jeremy Burns | Class Outfit wrote: > You can do something like this: > > if ($this->Session->check('Message.flash')): > $message = this->Session->read('Message.flash') > $this->Session->delete('Message.flash'); > endif; > > ...and then process $message as you like. A bit long winded, but... > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 15 Jun 2011, at 00:47, Ryan Schmidt wrote: > > > How about > > > > $flash = $this->Session->flash(); > > if (!empty($flash)) { > > echo '' . $flash . ''; > > } > > ?> > > > On Jun 14, 2011, at 17:00, Krissy Masters wrote: > > >> Missed the part where i said "I know about the flash session class options > >> but I need something more than a class in this case." Its more than just a > >> class div I need. > > >> -Original Message- > >> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On > >> Behalf > >> Of Ryan Schmidt > >> Sent: Tuesday, June 14, 2011 7:12 PM > >> To: cake-php@googlegroups.com > >> Subject: Re: Flash Session Variable > > >> On Jun 14, 2011, at 15:06, Krissy Masters wrote: > > >>> I know about the standard Session->flash(); ?> > > > -- > > 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: setFlash issue in 1.3?
I have a similar problem and wondering if this is a problem with 1.3.10 On May 18, 3:11 pm, Michael Gaiser wrote: > This line no longer seems to output a message nor does any other use of > setFlash. > > $this->Session->setFlash('Cookie created. It will expire > '.$this->Time->niceTime($cookie['expire'])); > > So when I was using 1.2 my code seemed to work out ok. Since migrating to > 1.3, I have made sure that Session was defined in my component and helper > arrays within my app_controller. Using setFlash used to display a message in > the next page. Is this still the proper way to use it? Any help on this > would be greatly appreciated. > > ~Michael -- 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: Wizard component: back link
If you want to save your data before previous (so user wont lose typed data): function _beforeCancel() { // if user click on "Cancel" button: $this->Model->save($this->data); } function _beforePrevious() { // if user click on "Back/Previous" button: $this->Model->save($this->data); } And to execute anything after finish the wizard: function _afterComplete() { // executed after finish the wizard $this->Model->save($this->data); } Just a hint. ˆˆ -- Renato Freire (31) 2514-3806 / 9968-1366 ren...@gsp.net.br On Wed, Jun 15, 2011 at 10:28 AM, nomen wrote: > Ok, I found it! > There is nothing special to do, simply write in view: > echo $this->Form->submit('Previous', array('name' => 'Previous', > 'div' => false)); > > > On 15 jun, 11:07, nomen wrote: > > Hi all: > > > > I´m using CakePHP Wizard Component fromhttps:// > github.com/jaredhoyt/cakephp-wizard > > It works well but I don´t know how to set a back link in view and > > I can´t find how to do it in the wikihttps:// > github.com/jaredhoyt/cakephp-wizard/wiki. > > How do I do in the view? How do I do in the controller? how do I > > retrieve the data entered by the user in the previous step? > > > > Thanks in advance. > > -- > 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: Wizard component: back link
Ok, I found it! There is nothing special to do, simply write in view: echo $this->Form->submit('Previous', array('name' => 'Previous', 'div' => false)); On 15 jun, 11:07, nomen wrote: > Hi all: > > I´m using CakePHP Wizard Component > fromhttps://github.com/jaredhoyt/cakephp-wizard > It works well but I don´t know how to set a back link in view and > I can´t find how to do it in the > wikihttps://github.com/jaredhoyt/cakephp-wizard/wiki. > How do I do in the view? How do I do in the controller? how do I > retrieve the data entered by the user in the previous step? > > Thanks in advance. -- 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: Bo field form db
yes, it was it. Thank You for Your help! On 15 Cze, 15:01, Jeremy Burns | Class Outfit wrote: > Perhaps the model has been cached. Check for files in the folders under > /tmp/cache/. Delete anything (except the folders) there and try again. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 15 Jun 2011, at 13:06, KooT wrote: > > > > > > > > > Im trying to get data from DB. > > I have table post: title, body etc from > > tutorialhttp://book.cakephp.org/view/1528/Blog > > > but i have add there some columns like: link, media > > > Now when im geting data in posts_controller: > > > $this->set('posts', $this->Post->find('all', array('order' => 'id > > DESC', 'limit' => 10))); > > > in posts i dont see new columns, why? > > > -- > > 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: Bo field form db
Perhaps the model has been cached. Check for files in the folders under /tmp/cache/. Delete anything (except the folders) there and try again. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jun 2011, at 13:06, KooT wrote: > Im trying to get data from DB. > I have table post: title, body etc from tutorial > http://book.cakephp.org/view/1528/Blog > > but i have add there some columns like: link, media > > Now when im geting data in posts_controller: > > $this->set('posts', $this->Post->find('all', array('order' => 'id > DESC', 'limit' => 10))); > > in posts i dont see new columns, why? > > -- > 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: Error: The component file was not found?
Any help? I am really helpless :-( -- 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: I am using jQuery in my form BUT it relies on ProtoType to work???
Use pure javascript vs the JS helper for jQuery - should sort it. On Jun 9, 8:48 am, OldWest wrote: > I could be missing something severely here, but this is just not adding up. > > I built an ajax form which is working perfectly fine with ProtoType and > Scriptaculous. > > I am migrating to Jquery, and so I added the jquery libraries etc.. > > Below is my $ajax submit.. *NOTE the jQuery coded loading and success > options..* > > What I cannot figure out is WHY WHY WHY does this work perfectly fine but > ONLY if I include the ProtoType library This makes absolutely no sense > to me because I am calling my loader with jQuery .show().. Why would > ProtoType have any effect on this?? > > *The submit section of my form* > > echo $ajax->submit('Submit', array('url' => array('controller' => 'plans', > 'action' => 'search_action_ajax'), > 'update' => 'ajax_search_div', > 'label' => 'Get Quotes >>', > 'id' => 'submitButton', > 'loading' => '$j("#busy-indicator").show()', > 'success' => '$j("#busy-indicator").hide()', > > )); > > I just want to disable ProtoType altogether.. > > *My controller helper is as follows:* > > var $helpers = array('Js' => array('Jquery'), 'Ajax', 'Html', 'Form', > 'Session'); > > As you can see I am calling in jQuery. > > *My libraries in my default.ctp* > > echo $this->Html->script('jquery-1.6.1.min', array('inline' => 'false')); > echo $this->Html->script('jquery-ui-1.8.13.custom.min', array('inline' => > 'false')); > > Side note: > > I also tested the script with the below just to ensure the jQuery was in > fact processing: > > ...'loading' => '$j("#busy-indicator").fadeIn("slow")',... -- 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: find list
Try the "threaded" find? But "list" with fields specified correctly should do the job. Read the documentation carefully: http://book.cakephp.org/view/1022/find-list On Jun 11, 3:33 am, cake-learner wrote: > Can I get the search result so that it returns the id as key? > so if you are searching for the users I want to get the result > returned like this. > > array( > [1] > => array( > [name] => "jone done" > [email] => 'j...@test.com" > ), > [2] > => array( > [name] => "mike tyson" > [email] => '...@test.com" > ) > ) > > i tried to use find list specifying the fields but it returns meanless > result > array( [ 1 ] => "jone done" => "m...@test.com" ) > > I am using 1.2.8 -- 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 inactive Acl
http://book.cakephp.org/view/1545/Preparing-to-Add-Auth At the bottom it explains how to allow actions currently not initialised as ACO's. On Jun 13, 7:21 pm, taq wrote: > now I use acl component in my webapp > when I add new action I got you unauthorize to access this location > I must to build new aco but I lazy I need to build after project > complete -- 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: POST from external site
Double check the URL you're sending the POST request to - and ensure the controller action is setup to receive it; especially if you're using Auth / ACL. Also post date in cake should be available in $this->params. On Jun 14, 3:53 pm, Ivan Rocha wrote: > Hi, > > I'm trying to integrate a CakePHP website to PagSeguro (brazilian's Paypal) > and when PagSeguro sends a POST containing the payment data, CakePHP don't > show the POST, even if I put in the controller a "debug($_POST); die();". > > I have checked the network tab of Firebug and the POST is being sent > correctly. I tried to use a pure PHP file outside CakePHP to receive the > POST and it shows the data normaly. > > I searched a lot about CSRF protection and found nothing. Is there any > Cake's "behaviour" that cleans the POST data? > > Thank you for helping, > -- > Ivan Rocha -- 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: Validating HABTM
I haven't actually made models for the Join table - I don't think you need to for a HABTM relationship On Jun 15, 1:41 pm, Rob Maurer wrote: > Interesting. What would happen if you put the validation in the model > for the join table? > > On Jun 14, 3:17 pm, Shaz wrote: > > > > > > > > > I can - but in that arises another situation: > > > I also have Location HABT Language - and I don't want any restrictions > > there. So a location can have more than 3 or no languages associated > > with it. > > > So if place the above $validate in language model, both users and > > locations will need to pass that validation; where I only want the > > users to... > > > Thanks! > > > On Jun 14, 8:14 pm, hunny wrote: > > > > Write the Validation Rule in Language Model instead of User Model > > > > On Jun 14, 9:56 pm, Shaz wrote: > > > > > I have User HABTM Language, and i want to ensure during a User add / > > > > edit they choose a minimum of one language, upto a maximum of 3. In > > > > the user model, for $validate I've tried: > > > > > 'Language' => array( > > > > 'multiple' => array( > > > > 'rule' => array('multiple', array('min' > > > > => 1, 'max' => 3)), > > > > 'message' => 'Please select a tleast 1 > > > > langiage upto a maximum of > > > > 3' > > > > ), > > > > ), > > > > > And in the add/edit form i have $this->Form->input('Language'); which > > > > doesn't actually validate. > > > > > It does work if I use language_id instead of Language (both in the > > > > form on the add/edit pages and in the model $validate) - but then it > > > > doesn't save any data in the join table. > > > > > Any advice on getting the above to validate, or save habtm when using > > > > "_id". -- 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
Bo field form db
Im trying to get data from DB. I have table post: title, body etc from tutorial http://book.cakephp.org/view/1528/Blog but i have add there some columns like: link, media Now when im geting data in posts_controller: $this->set('posts', $this->Post->find('all', array('order' => 'id DESC', 'limit' => 10))); in posts i dont see new columns, why? -- 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: Validating HABTM
Interesting. What would happen if you put the validation in the model for the join table? On Jun 14, 3:17 pm, Shaz wrote: > I can - but in that arises another situation: > > I also have Location HABT Language - and I don't want any restrictions > there. So a location can have more than 3 or no languages associated > with it. > > So if place the above $validate in language model, both users and > locations will need to pass that validation; where I only want the > users to... > > Thanks! > > On Jun 14, 8:14 pm, hunny wrote: > > > > > > > > > Write the Validation Rule in Language Model instead of User Model > > > On Jun 14, 9:56 pm, Shaz wrote: > > > > I have User HABTM Language, and i want to ensure during a User add / > > > edit they choose a minimum of one language, upto a maximum of 3. In > > > the user model, for $validate I've tried: > > > > 'Language' => array( > > > 'multiple' => array( > > > 'rule' => array('multiple', array('min' > > > => 1, 'max' => 3)), > > > 'message' => 'Please select a tleast 1 > > > langiage upto a maximum of > > > 3' > > > ), > > > ), > > > > And in the add/edit form i have $this->Form->input('Language'); which > > > doesn't actually validate. > > > > It does work if I use language_id instead of Language (both in the > > > form on the add/edit pages and in the model $validate) - but then it > > > doesn't save any data in the join table. > > > > Any advice on getting the above to validate, or save habtm when using > > > "_id". -- 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
More clarity needed on the usage assertText() function?
I have written automation test cases for my application.Below is the sample code i have used for web testing. class UserWebTestcase extends CakeWebTestCase{ var $name='UserWebTestcase'; function testLogin001() { //Test if new user registration form works as intended when all the inputs are given properly. $this->get(Configure::read('url')); $this->setField('email', 'admi...@gmail.com'); $this->setField('tmppassword', 'admin123'); $this->setField('password_confirm', 'admin123'); $this->clickSubmit('SUBMIT'); $this->assertText('login'); } } In test case it always gives false even though the inputs for fields are correct.The error i got like this (Failed C:\xampplite\htdocs\spotchase\app\tests\cases\models\user.test.php -> UserWebTestcase -> testLogin001). Im really confused while using the assertText() method.How should i use this assertText() method and what parameters should i pass to this method. Please help. -- 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: Working with a DB without Cake Convention
Model: class Availability extends AppModel { var $name = 'Availability'; var $useTable = 'bform'; function something() { return $this->find('list', array ('fields' => array ('row1', 'row2_E'))); } } In controller: function index() { $this->set('bform', $this->Availability->something()); } In view: echo $this->Form->input('Availability.somename', array ('type' => 'select', 'options' => $bform)); On 14 июн, 17:26, heohni wrote: > Hi, > > I have to use for a project a database which is a copy of a MS Access > database and I can't influence the name convention or its structure. > > This way I can't work like usually with Cake Models. > > I used > class Availability extends AppModel { > var $name = 'Availability'; > var $useTable = false; > > } > > And in my controller I do 'static' sql statements like > function index() { > $bform = $this->Availability->query("SELECT row1, row2_E FROM > bform"); > $this->set(compact('bform')); > > } > > debug($bform); > returns something like: > > Array > ( > [0] => Array > ( > [bform] => Array > ( > [row1] => 10 > [row2_E] => Torispherical Heads to DIN 28011 > ) > > ) etc... > > How can I create now a form input () with row1 as key and > row2_E as value? > I tried $this->set(compact('bform')); > But this returns me just a text field. > > I also have to say that row1 is defined as varchar field. > And I am not able to change that... I have to work with this crap. > > In the case that CAKE isn't able to help me, how can I create a input > select myself? > Any ideas? > > 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: Abnormal functioning of the models and controllers
this is because of some filename coventions...model class is UrlComentario and model filename is url_comentario.php class filename is url_comentarios_controller.php and classname is UrlComentariosController url is in your case: maybesubdirectory/url_comentarios/index -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/6/14 Rodrigo Alviani > My Model: > urlComentario.php > class UrlComentario extends AppModel > { >var $name = 'UrlComentario'; >var $useTable = 'url_comentario'; >var $primaryKey = 'id_comentario'; > } > ?> > > My Controller: > urlComentarios_controller.php > class UrlComentariosController extends AppController { >var $name = 'UrlComentarios'; >var $belongsTo = array("Urls"); > >function index() { >$this->set('UrlComentarios', > $this->UrlComentarios->find('all')); >} > } > ?> > > And when I access my_app/urlComentario the following error occurs: > === > Missing Controller > > Error: UrlComentarioController could not be found. > > Error: Create the class UrlComentarioController below in file: app/ > controllers/url_comentario_controller.php > > class UrlComentarioController extends AppController { > >var $name = 'UrlComentario'; > } > ?> > === > > And if I build this controller suggested (even with this filename) the > error that occurs is as follows: > === > Missing Database Table > > Error: Database table url_comentarios for model UrlComentario was not > found. > === > > I even using the $useTable correct. > > Can anyone help? > > -- > 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
Wizard component: back link
Hi all: I´m using CakePHP Wizard Component from https://github.com/jaredhoyt/cakephp-wizard It works well but I don´t know how to set a back link in view and I can´t find how to do it in the wiki https://github.com/jaredhoyt/cakephp-wizard/wiki. How do I do in the view? How do I do in the controller? how do I retrieve the data entered by the user in the previous step? Thanks in advance. -- 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
Error: The component file was not found?
Hi, I have just uploaded my local version to my webserver. Always a challange :-) I get these 2 errors which I don't understand.. Missing Component File Error: The component file was not found. Error: Create the class P28nComponent in file: app/controllers/ components/p28n.php I used this tutorial: http://bakery.cakephp.org/articles/p0windah/2007/09/12/p28n-the-top-to-bottom-persistent-internationalization-tutorial And I have the files like they did explain on my webserver (locally it works well!) Contoller and Component are there and with correct content, like in the example. -- Next: Notice (8): Undefined property: View::$Mailto [APP/views/elements/ addresses.ctp, line 8] Fatal error: Call to a member function encode() on a non-object in / srv/www/vhosts/baz-heads.de/httpdocs/cake/app/views/elements/ addresses.ctp on line 8 Line 8 = Mailto->encode('i...@xx.de', __('Send Email ')); ?> The file mailto.php is in /views/helper/mailto.php In app_controller.php I have var $components = array('P28n', 'RequestHandler', 'Session', 'Email', 'MathCaptcha'); var $helpers = array('Html', 'Mailto', 'Session', 'Javascript', 'Form'); What I am doing wrong? -- 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 1.3.10 - URL rewriting is not properly configured on your server
Hello, I did it but to no avail. I'm using wamp. I removed the comment that line: LoadModule rewrite_module modules/ mod_rewrite.so I observed the following lines: Options FollowSymLinks AllowOverride All #Order deny,allow #Deny from all Continues to show the error. What can I do? On Jun 8, 8:21 am, saidbakr wrote: > So it is a bug in home.ctp and cake.generic.css and it could be solved > as follows: > > add an id tag to the div that includes therewritingerror, the tag > will take the value : id="url-rewriting-warning". then in > cake.generic.css at the end of it add the following rule: > #url-rewriting-warning{ > display: none; > > } > > so if rewrite is going fine, it will load the css file anf hence the > error message willnotbe displayed. > > On Jun 6, 11:59 pm, majna wrote: > > > > > You need to update webroot/css/cake.generic.css > > used byURLrewritingcheck > > > #url-rewriting-warning { > > display: none; > > > } > > >https://github.com/cakephp/cakephp/blob/1.3/app/webroot/css/cake.gene... > > > On Jun 6, 4:03 pm, Ryan Olton wrote: > > > > > Sounds likeyourconfig isn't checkable somehow by the new 'check for > > > >urlrewriting' validation - work out why and file a bug report :) > > > > It appears that in the default home.ctp page there is this block of > > > code just hanging out without any conditional code in place to show or > > > hide this text ... in other words, you see in to matter what: > > > > > > > > > '); ?> > > > > > > > > > > > href="http://book.cakephp.org/view/917/Apache- > > > and-mod_rewrite-and-htaccess" style="color:#fff;"> > > > > > > > > > > > > > > > > > href="http://book.cakephp.org/view/931/CakePHP- > > > Core-Configuration-Variables" style="color:#fff;"> > > > > > useURLrewriting')?> > > > > > > > > > > > > -- 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
POST from external site
Hi, I'm trying to integrate a CakePHP website to PagSeguro (brazilian's Paypal) and when PagSeguro sends a POST containing the payment data, CakePHP don't show the POST, even if I put in the controller a "debug($_POST); die();". I have checked the network tab of Firebug and the POST is being sent correctly. I tried to use a pure PHP file outside CakePHP to receive the POST and it shows the data normaly. I searched a lot about CSRF protection and found nothing. Is there any Cake's "behaviour" that cleans the POST data? Thank you for helping, -- Ivan Rocha -- 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
Abnormal functioning of the models and controllers
My Model: urlComentario.php My Controller: urlComentarios_controller.php set('UrlComentarios', $this->UrlComentarios->find('all')); } } ?> And when I access my_app/urlComentario the following error occurs: === Missing Controller Error: UrlComentarioController could not be found. Error: Create the class UrlComentarioController below in file: app/ controllers/url_comentario_controller.php === And if I build this controller suggested (even with this filename) the error that occurs is as follows: === Missing Database Table Error: Database table url_comentarios for model UrlComentario was not found. === I even using the $useTable correct. Can anyone help? -- 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: Flash Session Variable
You can do something like this: if ($this->Session->check('Message.flash')): $message = this->Session->read('Message.flash') $this->Session->delete('Message.flash'); endif; ...and then process $message as you like. A bit long winded, but... Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Jun 2011, at 00:47, Ryan Schmidt wrote: > How about > > $flash = $this->Session->flash(); > if (!empty($flash)) { > echo '' . $flash . ''; > } > ?> > > On Jun 14, 2011, at 17:00, Krissy Masters wrote: > >> Missed the part where i said "I know about the flash session class options >> but I need something more than a class in this case." Its more than just a >> class div I need. >> >> -Original Message- >> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf >> Of Ryan Schmidt >> Sent: Tuesday, June 14, 2011 7:12 PM >> To: cake-php@googlegroups.com >> Subject: Re: Flash Session Variable >> >> >> On Jun 14, 2011, at 15:06, Krissy Masters wrote: >> >>> I know about the standard Session->flash(); ?> > > -- > 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