I'm using Translate behavior.
Here's the scenario: I save a translation on model 'Content' with the
language Japanese.
Then I check the corresponding table 'contents' in my database and I see that my 'title' and 'body' fields are changed to the translated inputs (in Japanese). My English (and Japanese) content is saved in the content_...
I'm having reports and complaints from my user that they will be using a screen and get kicked back to the login screen immediately on their next request. It doesn't happen all the time but randomly.
I am using CakePHP and the Auth component, which seem to work well other than this issue
I got some feedback on the Cake forums once tha...
Is there a way to check CakePHP's model relationships?
One model is saving twice on a table and I really suspect there's something wrong with my relationships. Problem is I have a lot of tables so it's really a pain. I'm wondering if there's a more sure and easy way of doing this maybe automatically? Thanks in advance!
...
Is there a shortcut for creating Unary associations in Cake?
For example, a user is a friend of another user. I'm pretty sure it's going to violate cake's conventions if I try it the hard way and code the associations myself.
Cake has HABTM:
var $hasAndBelongsToMany = array(
'User' =>
array(
'className' => 'User',
'joinTable...
I'm using various functions from the earthdistance module in PostgreSQL, one of those being ll_to_earth. Given a latitude/longitude combination, I'm trying to retrieve the nearest point from my database via CakePHP 1.2.5 Stable.
// set dummy data
$latitude = 30.4393696;
$longitude = -97.6200043;
// create a simple bounding box in the...
I'm aware of the benefits of using a PHP framework (not first hand though, just by reading SO, etc.) But what I don't hear about is the amount of "unlearning" a framework requires. When using a framework, you hand control to the new framework and you have to "unlearn" many things and re-learn them the new way as your new framework requir...
I'd like to test password recovery and similar email related features for a website.
I'm using PHP (cakePHP framework) and the syntax seems easy enough but I'm unsure of the email server setup.
I've looked around for a good tutorial but they aren't specific enough.
What is a quick and easy mail server to use locally? also... some init...
I'm new to CakePHP and am wondering how to protect my forms from Cross Site Request Forgery, ie adding a nonce to the forms. I've set the salt in the config file.
...
Hi,
Is there a way to stop cakephp ajax submit to stop the submission in case the user has not entered required details and click the submit button.
Regards
...
How does unbindModel happen in cake?
$this->User->unbindModel(array('hasAndBelongsToMany' => array('Friend')));
I wrote this in the beginning of a function. But still it queries the 'Friend' model. There was a call to paginate() in the middle of the function. So I thought the paginator might be generating the queries.
I did added an ...
Question related to HABTM has been posted in some good numbers on stackoverflow but I am still looking for a solution to my problem.
I am creating an application that allows for creation of topics based on a particular subcategory.
While adding a topic the user is asked for tags (on the same form). Now when the user has finished adding ...
Hi
i have table "User" and a Controller "users_controller.php"
and i have another table called "cateogry", need to retrieve values from this table in the
"listall" action(site.com/users/listall).
how can i get values from another table.
...
In my CakePHP 1.2.5 app, I have a Profile model that belongsTo a User model. The User model has a username field, and when performing a find() on the Profile model, I want to always automatically retrieve the value of User.username too. I figure it would make sense to modify my Profile model's beforeFind() method to automatically conta...
(Database structure like http://stackoverflow.com/questions/1545764/cakephp-select-default-value-in-select-input)
So, I have two tables in CakePHP: Trees, and Leafs. Every Leaf has a tree_id for its corresponding tree. Every leaf also has a numeric value. The default view that I baked for trees just lists all the trees in a table. I...
Is it possible for CakePHP's Containable behavior to request an aggregate column value during a find()? For example, in model Item containing numeric columns quarks and cogs:
$this->Item->contain('quarks + cogs AS total');
...
Hi,
i am trying to use the File upload feature in my application ..
i am having a Form with many fields of type Text,textarea and including File upload FIeld.
I have kept a Submit button at the end of the Form which on click will submit the actual value of the textbox /textarea and even the value for the Field of type File upload.
Ho...
I am sort of a newbie with CakePHP.
I have two tables: contacts and tags, and an HABTM table contacts_tags. User should be able to add tags as people can do in delicious.com. they get a list of tags as they type. They can also add new tags just by typing them. I want to check the tags table to see which tags are already present and which...
hi,
is __call() function availabe in CakePHP? I used this fucntion in Zend Framework.
class UsersController extends AppController {
function home(){
/*some action*/
}
function __call($m, $p){
print_r($m);
print_r($p);
}
}
getting erro like this
Missing Method in UsersController
<?php
class UsersController extends AppController {
...
hi i have a varible contaning "username" and want to get these values via session to any of the view page.
How can i use session vaible in view
...
In CakePHP, how do you select just a subtree in a model which actsAs tree?
I tried this, to find the tree headed by the item with label = "My Label"
$this->find("threaded", array(
"conditions" => array(
"label" => "My Label"
)
));
...however looking at the logs, it runs this SQL:
SELECT Menu.id, Menu.parent_id, Menu....