Problems setting up a simple Authentication

2009-09-15 Thread Andy
Hi all, I'm new to cake but am starting to pick it quite quickly now. One thing that has is causing me a bit of a head ache is getting some simple Authentication to work using Auth. The problem I seam to be having is that login function on my UsersController is getting called twice when I click t

Re: Problem publishing project

2009-09-15 Thread Janne
On 16 syys, 01:53, brian wrote: > Are you sure that Apache has mod_rewrite installed? > > On Tue, Sep 15, 2009 at 2:42 PM, Janne wrote: > > > I still need a solutions for this problem. Any ideas? > > > After that first post I have tried my project on other server& domain > > root and there it is

Re: controller setup - pagination

2009-09-15 Thread Cosmin Paul
This is correct : $this->paginate('Product'); On Wed, Sep 16, 2009 at 7:10 AM, borcho wrote: > > Hi, > > I am new to CakaPHP and I cannot figure out how to paginate products > listed under a category (many to many relationship) and also use > category table fields in the same view. I set up my

Re: Encoding problem

2009-09-15 Thread Roman
finally I found the solution to my problem. It was not the issue with DB either CakePHP. Problem was in PHP - low function. Never use it if you use encoding different than iso-8859-1. Instead of low use mb_strtolower("string", 'UTF-8"). Thanks for help. On 15 Wrz, 14:16, brian wrote: > Also, u

controller setup - pagination

2009-09-15 Thread borcho
Hi, I am new to CakaPHP and I cannot figure out how to paginate products listed under a category (many to many relationship) and also use category table fields in the same view. I set up my controller like this but I am pretty sure it's wrong even though it works. Any feedback would be appreciate

Problem with fixtures and test data

2009-09-15 Thread Jules
Hi, I've got a problem with a unit test retrieving REAL data, where I need to be using fixture data. I'll explain by way of example. - Model Widgets has a method abc(). - Widget->abc() retrieves data from another model, Shapes. The 2 models are NOT joined by any table relationships. The Shap

Re: Bug?

2009-09-15 Thread Dr. Loboto
1. To not receive empty records in DB you should also set fields there to NOT NULL 2. To make cake validate not only actual POST values but all fields that must be, you need more complex validation: var $validate = array( 'username' => array( 'rule' => 'alphaNumeric', 'required' => true

Re: Getting errors from SQL server

2009-09-15 Thread Dr. Loboto
You should call lastError() on model datasource: $this->getDataSource ()->lastError(), same for other DboMysql methods. On Sep 15, 6:39 pm, senser wrote: > Hello, > > I'm trying to find a way to get errors occurred when executing SQL > queries for adding, editing or deleting rows and show them i

Re: Variable substitution

2009-09-15 Thread Dr. Loboto
As all above said, you need placeholders and nothing more. Check String::insert() http://api.cakephp.org/class/string#method-Stringinsert to get nice wrap around boring str_replace. On Sep 15, 8:09 pm, djogo wrote: > All messages, emails, and receipts that my system sends are stored in > a datab

Forum plugin released

2009-09-15 Thread Miles J
So I just released my Cupcake forum plugin into a public beta. If you need an easily integrateable forum system into an existent Cake application, use this plugin! Download: http://www.milesj.me/resources/script/forum-plugin Demo: http://www.milesj.me/forum --~--~-~--~~~--

Question about Reverse Routing

2009-09-15 Thread Kyle Decot
I am having a little bit of trouble w/ my reverse routing. In my routes.php file I have: Router::connect('/search/*', array('controller' => 'skateparks', 'action' => 'index')); Then in my view I do something like: $html->link("Search for Something",array ("controller"=>"skateparks","action"=>"i

Re: Detecting an Address inside of a string

2009-09-15 Thread Kyle Decot
I can't always geocode the results though because sometimes the users just search for something like "free" or "outdoor". I know it would be impossible to catch ALL of the addresses but I would just like to do the most common ones that I've seen people search for on my website. Perhaps I could hav

Re: secure link using hmtl->link helper..

2009-09-15 Thread Miles J
I looked at the core Cake files and saw the "base" and "full_base" options. Im not sure how they are written though or if its possible to pass the protocal. Try different combinations likes "https" or "https:". If those dont work, try it on "full_base". If nothing, I guess well have to wait for a

Re: secure link using hmtl->link helper..

2009-09-15 Thread Aaron
Ahh, I figured it out from reading the code. The variable that I need is 'bare', not 'base'. So this works. $html->link('my account', array('bare' => 'https://', 'controller' => 'users')); On Sep 15, 5:40 pm, Aaron wrote: > That doesn't seem to be working. > What am I doing wrong here? > This

Pizza Online Order Notification?

2009-09-15 Thread TimG
Hey, I am developing a website for a local delivery place that will feature online ordering. I am competent enough to build the ordering part of the site but I did have one question for more developed programmers: I need a way for the restaurant to know immediately when someone places an order. T

Re: secure link using hmtl->link helper..

2009-09-15 Thread Aaron
That doesn't seem to be working. What am I doing wrong here? This is what I have in the code. $html->link('my account', array('base' => 'https://', 'controller' => 'users')); And this is what is showing up. my account Seems like I'm missing something basic here, just can't figure out what. On

Re: unable to load in a separate model

2009-09-15 Thread brian
Use Country. Cake's Inflector can handle it. As for the rest, you should be doing it in the controller. Also, you should use find('list') for a select tag. If your model is properly associated with Country, this should be simple. Here's how I do it for an Event model: class Event extends AppMod

unable to load in a separate model

2009-09-15 Thread www.landed.at
I need to do something like the following $this->loadModel('Countrie'); $countries = $this->Countrie->find('all'); echo $form->select('country',$countries) error is Call to undefined method View::loadModel Also have the inflection issue as country is not plurally similar to countries so I cano

Re: secure link using hmtl->link helper..

2009-09-15 Thread Miles J
Try adding 'base' => 'https://' to your URL array. --~--~-~--~~~---~--~~ 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 e

Re: using 2 models or 2 tables in one view

2009-09-15 Thread www.landed.at
There also seems to be no inflections file in the latest version so its difficult to know the syntax to create it. This is to make sure that countries and country are compatible. On Sep 16, 12:07 am, "www.landed.at" wrote: > I have a form lets say I'm doing a variation on the blog tutorial. > >

secure link using hmtl->link helper..

2009-09-15 Thread Aaron
What's the best way to extend the html->link function so that I can tell it to output a secure(https) link? Right now, I've added my own secure_link function that's basically a copy of the link function but adding a https to the beginning. But it seems like there should be a better way of overridi

Re: using 2 models or 2 tables in one view

2009-09-15 Thread www.landed.at
I have the side issue that If I specify the var $hasOne = 'Country'; inside location.php then it breaks a framework error hard to debug. With this the idea is that im saying that any created location has an associated record and only one inside countries. Am I running into the issue where its t

Auth / ACL Question

2009-09-15 Thread Dave Maharaj :: WidePixels.com
Quick question about setting up permissions. I am using admin routing configured to "manage" so all functions have manage_name now in the initDB function inthe cookbook $this->Acl->allow($role, 'controllers/Images'); if i wanted that user to be limited to only manage functions is this the cor

using 2 models or 2 tables in one view

2009-09-15 Thread www.landed.at
I have a form lets say I'm doing a variation on the blog tutorial. Instead of adding blogs I want to do locations as a kind of blog, keeping things really simple with a title field and a select box that is made up of all countries possible. I have a table with the countries already so I created

Re: find conditions comparing two fields

2009-09-15 Thread brian
Try: $conditions = array('User.id = User.parent_id'); On Tue, Sep 15, 2009 at 5:51 PM, George wrote: > > This seems like a simple thing to do, but I haven't been able to > figure out how to write the find conditions array to do it. Basically, > I want to run a query where I check whether one fi

Re: Problem publishing project

2009-09-15 Thread brian
Are you sure that Apache has mod_rewrite installed? On Tue, Sep 15, 2009 at 2:42 PM, Janne wrote: > > I still need a solutions for this problem. Any ideas? > > After that first post I have tried my project on other server& domain > root and there it is working. So is there something cake spesifi

Re: Detecting an Address inside of a string

2009-09-15 Thread euromark (munich)
which so many possible "human" formats, this is close to unachievable you could just geocode it anyway which google api etc and maybe they have some smart algorithms the zip, city and adress string itself is not the main problem this can be achieved with only few mistakes by using regex etc. bu

Re: phpThumb

2009-09-15 Thread euromark (munich)
and in the "cake" way of doing things, it is a constant that cake sets automatically with the correct slash (/ or \) so the proper path would be: 'save_path' => WWW_ROOT . 'garagecar'.DS.'thumbs', same with src but be careful with the non-system paths (web url paths!). they are always "/" no mat

How can I specify "at least one is required" between HABTM models

2009-09-15 Thread PD
I am developing a backup plan module for my application, where use can specify multiple items to be backed up. To save a backup plan, at least one item should be specified by the user. How can I add this requirement to my model validation. I am using the select->multiple checkbox to get the user

Re: Saving hasMany with HABTM

2009-09-15 Thread d
I've got it working, but am still concerned as to whether this is the 'right' way to do it. In my view, i had the Problems checkbox field as 'Appointment.Problem.Problem'. I changed that to just 'Problem.Problem'. To save everything, i am now doing this: if ($this->Meeting->save($this->data['Mee

find conditions comparing two fields

2009-09-15 Thread George
This seems like a simple thing to do, but I haven't been able to figure out how to write the find conditions array to do it. Basically, I want to run a query where I check whether one field in the record equals another field in the same record. A simple illustration in SQL: SELECT * FROM users as

Re: "Login failed. Invalid username or password." in Auth Component

2009-09-15 Thread Aivaras
Didn't you migrate to an existing database? Remember that Security::salt does not only use md5 or sha1 but also a Salt that you've filled in your core.php Faifas http://www.voveris.eu/ On Tue, Sep 15, 2009 at 22:10, Wladiston Paiva wrote: > Hi guys! > I find a problem in auth component. > > *Us

Re: phpThumb

2009-09-15 Thread Aivaras
DS stands for DIRECTORY_SEPARATOR which is / on unix and \ on windows. So, in fact, having an almighty mac does not solve the problem of DS :( Faifas http://www.voveris.eu/ On Tue, Sep 15, 2009 at 23:17, hahmadi82 wrote: > > > Hi, > > I'm developing this on a mac. I'm not sure what "DS" means

Tree behavior scope bug?

2009-09-15 Thread Jamie
I'm having an issue with Cake's Tree behavior, specifically setting a scope. I've created a dynamic navigation system so that clients can manage navigation lists and items via a CMS. The associations look like this: NavList hasMany NavItem NavItem belongsTo NavList Simple enough. NavItem uses tr

Re: Possible ACL or Cookie Issue When I Reload Page

2009-09-15 Thread hahmadi82
I've tested further and found that after reloading the page a few times, it's the entire Auth->user that does not exist until I load a different page. Please help. hahmadi82 wrote: > > There's a very peculiar problem with my site that I can't quite figure > out. My "garage" page loads/display

Re: phpThumb

2009-09-15 Thread hahmadi82
Hi, I'm developing this on a mac. I'm not sure what "DS" means, if you could please clarify. Can you show me an example of what you mean with what I posted? I also added the code you wrote below to the create_thumb function in phpThumb.php (before setparameters() and after $this->php_thumb() =

Re: to the CakePHP authors...

2009-09-15 Thread 3rdBear
Just wanted to +1 on lordG's comments - I started using Cake about a month ago, and I've been amazed at how well thought out it is. I'm developing a website to present business data to small retailers, and there is no way I would have been able to make the progress I've made without Cake. Thanks f

Re: Iphone Detect

2009-09-15 Thread cakephp_rocks
thanks for that now how to integrate this cookie with the other code i have as told you guys never done it before please help with this function setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((e

"Login failed. Invalid username or password." in Auth Component

2009-09-15 Thread Wladiston Paiva
Hi guys! I find a problem in auth component. *User Model:* class User extends AppModel { var $name = 'User'; } *Users Controller:* class UsersController extends AppController { var $name = "Users"; var $uses = array('User'); var $components = array('Auth'); function beforeFi

Re: Iphone Detect

2009-09-15 Thread majna
http://www.w3schools.com/JS/js_cookies.asp On Sep 15, 7:35 pm, cakephp_rocks wrote: > how to save it in cookie and any idea never done it before > > On Sep 15, 10:29 am, iFeghali wrote: > > > in the default view of your site or maybe the default template ? but > > you'd better save the answer i

Detecting an Address inside of a string

2009-09-15 Thread Kyle Decot
When my users enter something like "something near 123 Main St", I'd like to be able to detect that and Geocode my results. How would I detect this? Some other examples I'd like to work w/ are: "something within 40 miles of 43112" Thanks for any help you can provide --~--~-~--~~-

Re: HABTM pagination issue

2009-09-15 Thread Miles J
To paginate with HABTM, you must use the HABTM model. $this->paginate('RolesUser'); On Sep 15, 11:32 am, Jacques wrote: > Having a similar problem, anyone have any ideas? > > On Sep 2, 8:08 am, double07 wrote: > > > Hi All, > > > I'm having an issue with usingHABTMwithpagination... > > > My ap

Re: Problem publishing project

2009-09-15 Thread Janne
I still need a solutions for this problem. Any ideas? After that first post I have tried my project on other server& domain root and there it is working. So is there something cake spesified settings on server, which could the problem? Anyone faced this? --~--~-~--~~~-

Saving hasMany with HABTM

2009-09-15 Thread dw
i could have sworn this has worked for me in the past, but in the following example i cannot get the HABTM record to save. can anyone see what i am doing wrong? Models: Meeting: var $hasMany = array( 'Appointment' => array('className' => 'Appointment',

Re: HABTM pagination issue

2009-09-15 Thread Jacques
Having a similar problem, anyone have any ideas? On Sep 2, 8:08 am, double07 wrote: > Hi All, > > I'm having an issue with usingHABTMwithpagination... > > My app has a users and roles table - usersHABTMroles, roles have > many users. > > In my users index controller I'm trying to limit thepagina

Re: incorrect resulting array from a multiselect option problem please help

2009-09-15 Thread WebbedIT
Try this input($j.'.OfferedSubject.Course', array ('multiple'=>true)); ?> If the form helper is building the select right, the above will change it from a single select to multiple select. --~--~-~--~~~---~--~~ You received this message because you are subscribed

RE: Why will this not save?

2009-09-15 Thread Dave Maharaj :: WidePixels.com
Thanks, I will add that and see what shows up. Dave -Original Message- From: Marcelo Andrade [mailto:mfandr...@gmail.com] Sent: September-15-09 3:32 PM To: cake-php@googlegroups.com Subject: Re: Why will this not save? On Mon, Sep 14, 2009 at 7:48 PM, Dave Maharaj :: WidePixels.com

Re: Why will this not save?

2009-09-15 Thread Marcelo Andrade
On Mon, Sep 14, 2009 at 7:48 PM, Dave Maharaj :: WidePixels.com wrote: > (..) >   if ($this->User->save($this->data, true, > array_intersect(array_keys($this->User->schema()), $white))) { >   $this->Session->setFlash(__('Password Changed.', > true)); >  

Re: Setting default in form options

2009-09-15 Thread Marcelo Andrade
On Mon, Sep 14, 2009 at 12:56 PM, Whitty wrote: > (..) >  echo $form->input('Address.addr_id',array('options'=> > $addresslist,'label'=>'Select Address')); > > How do I modify the above line to set the current address as the > default? You can pass the "value" or "default" attrib to your input.

Re: Stop queries from executing

2009-09-15 Thread Marcelo Andrade
On Mon, Sep 14, 2009 at 12:36 PM, Dave Maharaj :: WidePixels.com wrote: > > Yeah I tried that. Going with this as it seems to work. > > if ($status == 0) { >                          //Account is Pending admin approval; >                          $this->redirect(array('controller' => 'users', > '

Re: what the ef, so frustrated

2009-09-15 Thread aimformyleftnut
yea, that's right. unfortunately, no that would not have worked under the rules I had entered in the htaccess file -- as I stated... now it works as it should. On Sep 15, 11:16 am, Miles J wrote: > So why do you even have this route? > > Router::connect('/:controller/:action', array > ('control

Re: Iphone Detect

2009-09-15 Thread cakephp_rocks
how to save it in cookie and any idea never done it before On Sep 15, 10:29 am, iFeghali wrote: > in the default view of your site or maybe the default template ? but > you'd better save the answer in a cookie or something. --~--~-~--~~~---~--~~ You received this

Re: contain mystery

2009-09-15 Thread brian
Never mind. I'd started adding debug() calls in containable.php and never saw them printed. Then I realised that I'd forgotten to create my own AppModel with $actsAs = array('Containable'); Aaaargghh! Now I've got to take a closer look at this latest model.php to figure out why *some* of the 'cont

Re: Iphone Detect

2009-09-15 Thread iFeghali
in the default view of your site or maybe the default template ? but you'd better save the answer in a cookie or something. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send

Re: to the CakePHP authors...

2009-09-15 Thread mark_story
Hi G, Glad to hear that you are enjoying developing with CakePHP. Its always nice to hear people having positive experiences, with the code we've worked on. -Mark On Sep 15, 6:25 am, lordG wrote: > Hi Guys, > > Thought I'd just make a post to say thank you for creating CakePHP. > It's been a s

Re: multiple relations to the same model

2009-09-15 Thread Josh
Thanks a lot Brian. That works for me but I need to create a new relation. Any way to specify an existing relation by its alias in bindModel or in the save function? I don't see anything like that in the documentation. Thanks a lot. Josh On Sep 15, 7:55 am, brian wrote: > Use bindModel() a

Re: multiple relations to the same model

2009-09-15 Thread Josh
Thanks Brian. That works for creating a new model relation... it gets the job done for me. But, is there a way to reference an existing model relation by its alias? The documentation seems to say that bindModel expects a classname of another model. I tried giving it an alias to no avail. Any id

RE: Validation Help

2009-09-15 Thread Dave Maharaj :: WidePixels.com
Good looking out! Thanks man. It all looks the same when you stare at it for hours. Fresh eye. Thanks, Dave -Original Message- From: mikeottinger [mailto:mikeottin...@gmail.com] Sent: September-15-09 1:32 PM To: CakePHP Subject: Re: Validation Help Hi Dave, you might check your spel

Re: what the ef, so frustrated

2009-09-15 Thread Miles J
So why do you even have this route? Router::connect('/:controller/:action', array ('controller'=>'shorteneds', 'action'=>'index')); If you go to /shorteneds/index/ it will work automatically without the need for a route. On Sep 15, 7:57 am, aimformyleftnut wrote: > OK so -- Solved this problem

Re: How to save sorted by 'column'?

2009-09-15 Thread AD7six
On 13 sep, 21:30, Jeroen wrote: > For the whole three I want to sort all the direct childs first on date- > of birth and then on lastname, so I think the reorder-method won't > work. When you tried it - did it work. > > I tried the following method: > $this->Person->children(array( >          

mssql textlimit problem

2009-09-15 Thread April Hodge Silver
When using cakephp with mssql, a character limit of 4096 is set. So when retrieving from the db (saving, too?) longer texts are truncated. I've searched the web for an answer to this question and can only find other statements of the problem (e.g. http://bugs.php.net/bug.php?id=38805). The soluti

Re: Auth Question

2009-09-15 Thread AD7six
On 15 sep, 17:30, cakephp_rocks wrote: > this is in my Userscontroller im using ad7six's mi-base > function beforeFilter() { >                 parent::beforeFilter(); >                 if (Configure::read()) { >                         $this->Auth->allow('admin_init_acl'); >                 } >

Re: Validation Help

2009-09-15 Thread mikeottinger
Hi Dave, you might check your spelling real quick: minLenght should be minLength. That's probably why your length validation is always passing. On Sep 15, 8:30 am, "Dave Maharaj :: WidePixels.com" wrote: > I am finally getting around to implementing the validation rules but seem to > be not quit

Re: Auth Question

2009-09-15 Thread cakephp_rocks
this is in my Userscontroller im using ad7six's mi-base function beforeFilter() { parent::beforeFilter(); if (Configure::read()) { $this->Auth->allow('admin_init_acl'); } $this->set('authFields', $this->Auth->f

Validation Help

2009-09-15 Thread Dave Maharaj :: WidePixels.com
I am finally getting around to implementing the validation rules but seem to be not quite understanding it or something. I have this set up to validate Username: 'username' => array( 'user-notempty' => array( 'rule' => array( 'minLenght',

Re: Question on the method input of Form helper relative to type 'date'

2009-09-15 Thread Kevin Wentworth
@WebbedIT: Thanks for the response. I do have it in the $form->create (). I believe this is a bug. Cakephp will only use the field name in a form where type=>get. The code in the form helper __name() function has special logic for method="get" forms. This logic severely limits the complexity o

Re: how to handle general form errors?

2009-09-15 Thread mikeottinger
Thanks Brian for the info. So I actually already use the FormHelper::error(). Let me paste in some code below to show what I have and what I'm shooting for. Everything below works, it's just not quite what I want; In my user model I'd like to associate the mustMatchRule with the form submission a

Re: displayField is not in the database (mixed models?)

2009-09-15 Thread iFeghali
Hello Brian, Thank you for your reply. Yes, that could be an alternative but it would require lots and lots of changes. I am not talking about only one single "select", but all the places in the application that refers to a "User" (there are many of them). Anyway I am curious to know whether I ca

Pagination with Language variable ! Hot to ? ? ?

2009-09-15 Thread DatacenterHellas
Hello all ! :) I have create a controller with pagination. All are working perfect except of the paginator links. What I like to do is to pass thru the url variables to my action. The question is how ? ? ? I already have write that into my View options(array('url'=>array_merge(array ('language

Re: what the ef, so frustrated

2009-09-15 Thread aimformyleftnut
OK so -- Solved this problem late last night. It had to do with the .htaccess setup in my top level directory -- i dunno if this will always be the solution, but if you change the rewrite base to the location of your app (i.e. in my case /app) it takes care of all this malarkey. I should have pr

contain mystery

2009-09-15 Thread brian
Using 1.2.5 I'm having some trouble get a deep containment (PresentationFile) to show up. No matter what I've tried, I only get Presentations. Can anyone see something wrong with the following? event.php class Event extends AppModel { public $belongsTo = array('Country'); public $hasMany = a

Re: Variable substitution

2009-09-15 Thread brian
Use something like 'Hello, xx_NAME_xx, your password is: xx_PASSWORD_xx' When you want to output to an email, etc. use str_replace(), eg: $search = array('xx_NAME_xx', 'xx_PASSWORD_xx'); $replace = array($destinatary[Person][name], $password); $msg = str_replace($search, $replace, $the_string_fr

Re: Variable substitution

2009-09-15 Thread djogo
All messages, emails, and receipts that my system sends are stored in a database table. This way, system administrators are able to customize these messages without having to interact with programmers. Therefore, I need generic placeholders. I could write a hundred substr (), for each message typ

Re: incorrect resulting array from a multiselect option problem please help

2009-09-15 Thread learning_cake_php
sir Webbedit heres my rel: Subject hasMany OfferedSubject OfferedSubject HABTM Course heres my controller without the save: function offeredSubjectAdd($subjectId = null, $lastSec = null, $numSec = null){ debug($this->data); if(isset($this->data['nu

Re: displayField is not in the database (mixed models?)

2009-09-15 Thread brian
You could just create the select list yourself, using a loop, rather than have FormHelper do it. Just make sure the name attribute is as Cake expects it to be. On Tue, Sep 15, 2009 at 8:00 AM, iFeghali wrote: > > Hello All, > > I just got stuck with a little issue that I would appreciate any hel

Re: Auth Question

2009-09-15 Thread brian
On Mon, Sep 14, 2009 at 9:48 AM, cakephp_rocks wrote: > > this is in my app controller > > function beforeFilter( ) { >        parent::beforeFilter(); >                $this->Auth->loginAction = array('admin' => false, > 'controller' => > 'users', 'action' => 'login'); >                $this->Au

Re: how to handle general form errors?

2009-09-15 Thread brian
Use FormHelper::error(). If there is no error for a particular filed, it'll return null. So, you can do something like: error(...) ?> http://api.cakephp.org/class/form-helper#method-FormHelpererror On Mon, Sep 14, 2009 at 11:29 PM, mikeottinger wrote: > > Thanks for the reply. So in your code,

Re: Encoding problem

2009-09-15 Thread brian
Also, use a terminal to verify that the data is as it should be. If all you have to work with is PHPMyAdmin, check that its pages are using UTF-8. It's easy, with MySQL, to import UTF-8 data that gets destroyed. If using an import file, put the following at the top: SET NAMES 'utf8'; And, of co

Re: incorrect resulting array from a multiselect option problem please help

2009-09-15 Thread brian
It seems to be a new thread. On Tue, Sep 15, 2009 at 5:08 AM, WebbedIT wrote: > > @ learning_cake_php: I just took ages to submit a reply which seems to > have gone nowhere, did I send it to you via email? (i.e. clicked > 'reply to author') > > > --~--~-~--~~~---~--~

displayField is not in the database (mixed models?)

2009-09-15 Thread iFeghali
Hello All, I just got stuck with a little issue that I would appreciate any help. I have got a Model that is partially stored in a database, and the other attributes are gathered in the "afterFind" time. For instance, given a model "User" the username is in the database but all the user data (ful

Re: model method executed as sql query problem.

2009-09-15 Thread brian
Set debug to 2. Also, delete all files in app/tmp/cache/models/ folder. Then double-check those filenames and the names of the classes. :-) On Mon, Sep 14, 2009 at 4:58 PM, Herberth Amaral wrote: > > Sorry for post in this old topic, but I am having the same problem in > my models and their fil

Re: multiple relations to the same model

2009-09-15 Thread brian
Use bindModel() and/or unbindModel() where appropriate. On Tue, Sep 15, 2009 at 12:06 AM, Josh wrote: > > Hello, > > I have a question about multiple relations to the same model (http:// > book.cakephp.org/view/851/Multiple-relations-to-the-same-model) > > I have two tables, Infos and Ielements.

Re: Bug?

2009-09-15 Thread Vladiq
UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`,`username`), You right. But why validation doesn't work? On 15 сен, 14:48, Martin Westin wrote: > If you really did set "username, email to unique" and not "username > unique and email unique" (see the difference?) all is as i

Re: Bug?

2009-09-15 Thread Martin Westin
If you really did set "username, email to unique" and not "username unique and email unique" (see the difference?) all is as it should be. In the first instance (one index combining the two fields) would have to have the same username and email combination for MySQLs index to throw an error. Is

Getting errors from SQL server

2009-09-15 Thread senser
Hello, I'm trying to find a way to get errors occurred when executing SQL queries for adding, editing or deleting rows and show them in view. There is a method in DboMysql called lastError() but when calling it I receive an error: "Undefined property: ***::$connection". There is a callback method

Bug?

2009-09-15 Thread vla...@gmail.com
Cake PHP 1.2.5, MySQL 5.* What I have: model user (all default) and: var $validate = array( 'username' => 'alphaNumeric', 'password' => 'notEmpty', 'name' => 'notEmpty', 'email' => 'email', ); In MySQL I set for this table (users) fields: userna

to the CakePHP authors...

2009-09-15 Thread lordG
Hi Guys, Thought I'd just make a post to say thank you for creating CakePHP. It's been a superb framework and has allowed me to grow in my programming skills over the years. I look forward to seeing it grow further and become more of a kick-ass environment! Well done! G --~--~-~--~~-

Containable, bindModel and HABTM problem

2009-09-15 Thread Ponch316
Hello, I have a problem with a couple of models that share a HABTM relationship. I've tried two different approaches, but none provide the desired result. Here are they both, I hope you can help me to fix either of them to get the array I need. I'm using the good old Post hasAndBelongsToMany Tag

themeView issue

2009-09-15 Thread Anish .C
Hi, I am getting this error on my cakePHP project when am trying the theme concept. Please help me out. *Fatal error*: Class 'ThemeView' not found in * /var/www/ts/cake/libs/controller/controller.php* on line *775 *Please help me to find a solution. Regards, Anish. --~--~-~--~~---

themeView issue

2009-09-15 Thread Anish
Hi all, I am doing my first cakePHP project. I am using CakePHP 1.2.3.8166. I tried the concept themes in my project with the help of sanisoft blog, pseudocoder and with the help cakphp tutorial. when I tried I got the following error: Fatal error: Class 'ThemeView' not found in /var/www/ts/cake

Re: Strange 404 error

2009-09-15 Thread Warringer
Thank you. That was what happened... I dropped the Security Component from the app_controller and than imported it where I need it. Now it works as it should work. Thanks. - Warringer On 15 Sep., 10:08, wilfredo wrote: > I had a similar problem this days. I found out, that this was a > prob

Re: Using the Auth component when creating Plugins

2009-09-15 Thread Bart
I've found the solution. In the beforeFilter() instead of putting this: $this->Auth->loginAction = array ('controller'=>'users','action'=>'login'); Put the following: $this->Auth->loginAction = array ('plugin'=>'users','controller'=>'users','action'=>'login'); On 12 sep, 23:35, Bart wrote: > He

Re: incorrect resulting array from a multiselect option problem please help

2009-09-15 Thread WebbedIT
@ learning_cake_php: I just took ages to submit a reply which seems to have gone nowhere, did I send it to you via email? (i.e. clicked 'reply to author') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" grou

Re: incorrect resulting array from a multiselect option problem please help

2009-09-15 Thread WebbedIT
As my post states, I do not believe you can save multiple OfferedSubject at once, each having their own HABTM Course. You would need to create a form which produces an array as shown above. Now I am have no idea about your schema as your form obviously includes data from Subject and Section mode

Re: Question on the method input of Form helper relative to type 'date'

2009-09-15 Thread WebbedIT
@Kevin: Where were you entering 'type'=>'get'? It should go into the $form->create() call and will not cause the form helper to alter the way in which it automagically names fields. Paste your view and resulting HTML output and I will explain what's happening. --~--~-~--~~---

Re: Strange 404 error

2009-09-15 Thread wilfredo
I had a similar problem this days. I found out, that this was a problem with the security component. When the security component is enabled all the POST data is validated. If there is a problem with this data, you are redirected to a blank 404 page (black page). I disabled the security component

Re: Master Filter for HABTM-Relationships

2009-09-15 Thread Marco
This brought the solution: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email