Hi,
I'm sure this issue can be solved rapidly, but I don't find any answer on the web, so here I am. I want to call a function from another controller, but CakePHP does not recognize it as a function but as a query, returning a warning:
Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that correspo...
I have a database of locations the user can select from by typing and autocompletion. In my CakePHP controller, I do this:
$locations = $this->Location->find('all', array(
'conditions' => array('Location.name like' => '%'.$term.'%'),
'fields' => array('Location.id', 'Location.name', 'Region.name'),
'order' =>...
Hi guys
I am a cakephp newbie and I would like to know what method you guys use to build your cakephp project. The tutorial I read is using cakephp console to bake application but the book I have use IDE to build the application. It seems console is more convenience because it can generate different projects name...Using IDE would requi...
I've got two legacy codebases that I would like to have living side by side. One is Cake, one is handwritten PHP.
I would like both to be located at www.example.com. I'd like the handwritten PHP to serve any requests in the root directory, but anything else I'd like to go to the cake codebase. I cannot simply put cake in a subdir, be...
I am wondering whether it is possible to create a hasMany Relationship in a Model which makes use of the ID of the logged in user.
Example:
One tip has many votings (from different users). This is easy:
public $hasMany = array(
'TipVoting' => array(
'className' => 'TipVoting',
'foreignKey' => 'tip_id',
'depen...
I have just upgraded from php 5.1 to 5.3 and had previously been using cakephp 1.1 on my server. Since the upgrade (or possibly earlier, I can't be sure), I'm getting the following errors. Can anyone shed some light:
Deprecated: Assigning the return value of new by reference is deprecated in /home/vhosts/bbblh.co.uk/httpdocs/cake/dispat...
CakePHP's Auth component requires the username field to be present in order to convert the password field into a hash upon save. Apparently, even if I put this in the beforeFilter() - "$this->Auth->fields = array('username' => 'email', 'password' => 'password');" - it doesn't encrypt the password before inserting it into the database. S...
Hi -
I have a 1.2 app that I'm updating to 1.3. I need to send all top level requests like /foo to a controller action (/sites/view/$1) if they are not a valid controller. So in my 1.2 app I had a route like this (incredibly ugly I know):
Router::connect('(?!admin|billings|carriers|clips|cliptypes|contacts|domains|faqs|leadcomments|...
Hi,
I'm using jQuery to make an AJAX request to some controller action. This request is activated from a button in the view of the edit action in the same controller.
My problem:
The Ajax Request is returning all the code of the edit view (with all the forms and inputs) instead of the expected number. If I put the same ajax button in ...
I have two tables, Pages and Posts that are in HABTM and are joined using pages_posts join table.
My Page model along with the HABTM definition contains a function..
class Page extends AppModel
{
var $name = "Page";
......
......
function callthis()
{
return $this->find('all');;
}
}
From my Posts controller, I'...
i want to know the code for at a time single user login on any browser or computer of a
user.
Can u help me.
Thanxs,
...
I wanna to know how to install cakephp on localhost?
Please explain me.
...
Hi,
I have a query using the Containable behaviors in cakephp thats looks like this :
$x = $this->find('first',array('contain'=>array(
'User' => array(
'SelectionsTeam' => array('conditions' => $conditionTeamSelection,
'Team' => array(
'fields' => array('name','city','id'),
...
Hi,
I have several js files under webroot
http://www.in-culture.info/app/webroot/js/
All the files are ok
Eg http://www.in-culture.info/app/webroot/js/lightbox.js
Except this
http://www.in-culture.info/app/webroot/js/jquery.cookie.js
It's throwing 406 Not acceptable error.
Help please.
...
Is there any way to change the placement of form validation messages in CakePHP? For instance, I have the following:
In the view:
echo $form->input('fname', array('before' => '<li>', 'label' => 'First Name', 'after' => '</li>'));
In the controller:
'fname' => array('rule' => 'notEmpty', 'message' => 'Please enter your first name.'),...
Hi
I have Event belongsTo Venue association.
When a user tries to delete a venue, I don't want it to happen when one or more event is associated with it.
What's the most automagic way to do it?
...
Hi,
I have Venues HasMany Events association.
In the side bar, I want to list only Venues with at least one event associated.
What's the find condition?
...
I've been using cakephp for a while, but have not learned all the ins and outs yet so I may be missing something simple. Or the problem may lie with my database structure. Either way, if anyone has any idea of what I'm doing wrong, please share.
Is there a way to order the data returned by cakephp's find using values stored in another t...
I'm specially looking for a good UI to manage permissions of users/groups based on CakePHP's auth and acl components.
is anyone knows a good plugin (or good working code) to manage users and their permissions?
...
Hi, so I have a Tarif, which hasMany Price (each for different currency - doesn't really matter)
the view (deleted irrelevant parts)
<?php echo $this->Form->create('Tarif');
echo $this->Form->input("Price.0.price");
echo $this->Form->input("Price.0.currency");
echo $this->Form->input("Price.0.sms_format");
echo $this->Form->inp...