Re: Flash Session Variable

2011-06-15 Thread Jeremy Burns | Class Outfit
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

Abnormal functioning of the models and controllers

2011-06-15 Thread Rodrigo Alviani
My Model: urlComentario.php ?php class UrlComentario extends AppModel { var $name = 'UrlComentario'; var $useTable = 'url_comentario'; var $primaryKey = 'id_comentario'; } ? My Controller: urlComentarios_controller.php ?php class UrlComentariosController extends

POST from external site

2011-06-15 Thread Ivan Rocha
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

Re: cakephp 1.3.10 - URL rewriting is not properly configured on your server

2011-06-15 Thread Anderson Machado
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: Directory / Options FollowSymLinks AllowOverride All #Order deny,allow #Deny from all /Directory Continues to

Error: The component file was not found?

2011-06-15 Thread heohni
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

Wizard component: back link

2011-06-15 Thread nomen
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

Re: Abnormal functioning of the models and controllers

2011-06-15 Thread Tilen Majerle
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

Re: Working with a DB without Cake Convention

2011-06-15 Thread Dr. Loboto
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',

More clarity needed on the usage assertText() function?

2011-06-15 Thread prasad
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

Re: Validating HABTM

2011-06-15 Thread Rob Maurer
Interesting. What would happen if you put the validation in the model for the join table? On Jun 14, 3:17 pm, Shaz shazam...@gmail.com 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

Bo field form db

2011-06-15 Thread KooT
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' =

Re: Validating HABTM

2011-06-15 Thread Shaz
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 robmau...@gmail.com wrote: Interesting. What would happen if you put the validation in the model for the join table? On Jun 14, 3:17 pm, Shaz

Re: POST from external site

2011-06-15 Thread Shaz
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 ivan.cr.n...@gmail.com wrote: Hi, I'm trying to

Re: How to inactive Acl

2011-06-15 Thread Shaz
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 taqman...@gmail.com wrote: now I use acl component in my webapp when I add new action I got you unauthorize to access this location

Re: find list

2011-06-15 Thread Shaz
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 sh.koiz...@gmail.com wrote: Can I get the search result so that it returns the id as key? so if you

Re: I am using jQuery in my form BUT it relies on ProtoType to work???

2011-06-15 Thread Shaz
Use pure javascript vs the JS helper for jQuery - should sort it. On Jun 9, 8:48 am, OldWest ja...@jasonwydro.com 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

Re: Error: The component file was not found?

2011-06-15 Thread heohni
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

Re: Bo field form db

2011-06-15 Thread Jeremy Burns | Class Outfit
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.

Re: Bo field form db

2011-06-15 Thread KooT
yes, it was it. Thank You for Your help! On 15 Cze, 15:01, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com 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

Re: Wizard component: back link

2011-06-15 Thread nomen
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 gaston...@gmail.com wrote: Hi all:     I´m using CakePHP Wizard Component

Re: Wizard component: back link

2011-06-15 Thread Renato de Freitas Freire
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:

Re: setFlash issue in 1.3?

2011-06-15 Thread john lyles
I have a similar problem and wondering if this is a problem with 1.3.10 On May 18, 3:11 pm, Michael Gaiser mjgai...@gmail.com 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

Re: Flash Session Variable

2011-06-15 Thread MrSensitive
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 jeremybu...@classoutfit.com wrote: You can do something like

After failed validation, make captcha text field empty

2011-06-15 Thread heohni
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

How get the database name from a Model?

2011-06-15 Thread 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

Re: How get the database name from a Model?

2011-06-15 Thread Tilen Majerle
$useTable -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/6/15 Celso cels...@gmail.com 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

Easy Query Seems Difficult to Fire

2011-06-15 Thread Zuha
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` =

Re: Validating HABTM

2011-06-15 Thread nachopitt
You should check this: http://bakery.cakephp.org/articles/nachopitt/2010/07/01/habtm-validatable-behavior On 15 jun, 08:24, Shaz shazam...@gmail.com 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

Re: Easy Query Seems Difficult to Fire

2011-06-15 Thread Jeremy Burns | Class Outfit
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

Load models without model files

2011-06-15 Thread qua...@gmail.com
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

Re: Easy Query Seems Difficult to Fire

2011-06-15 Thread Zuha
Close... select where we only pull back contacts where the company belongsTo contact On Jun 15, 3:00 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Are you trying to do an inner join where you only pull back contacts who belong to a company? Jeremy Burns Class Outfit

Re: Easy Query Seems Difficult to Fire

2011-06-15 Thread Zuha
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`

Silent Mode on MYSQL Errors

2011-06-15 Thread euromark
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

Re: How get the database name from a Model?

2011-06-15 Thread euromark
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 tilen.maje...@gmail.com wrote: $useTable -- Lep

Re: How get the database name from a Model?

2011-06-15 Thread Dr. Loboto
$databaseName = $this-getDataSource()-config['database']; On 16 июн, 00:06, Celso cels...@gmail.com 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

Using Pages

2011-06-15 Thread brandon buster
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? --

I need example for this

2011-06-15 Thread taq
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

Re: Load models without model files

2011-06-15 Thread Dr. Loboto
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 qua...@gmail.com wrote: Hi, I have