A few Ideas:
* set your primaryKey attribute to 'ID' in the model:
http://book.cakephp.org/2.0/en/models/model-attributes.html#primarykey
* debug the return value of your save($data) call
* debug $this->Player->validationErrors after the save call
* try setting the model ID ($this->Player->id =
Is the Auto Increment attribute set for the ID column?
On 07/11/2012 03:39 PM, mohit kumar wrote:
Hi Folks,
I created an add action for users,
I am trying to register them using this action. Everything is going
fine, the data is being submitted, the passwords are being hash and if
I check the
I guess in your view you have to pass in the id (echo
$this->Form->input('id');). This should include a hidden id field.
I wonder why it works the first time (without leaving a field blank).
Are you sure the user gets edited and not a new user created? Because
when you save $this->request->data,
Hi,
have you tried copying the core "CakeRequest.php" to
"app/Lib/Cake/Network/CakeRequest.php" and do your changes there? I
think I remeber doing something like this with the Dispatcher and cake
automagically used the one from the app. The problem I had back then was
that I had to copy the w
rote:
This could be the case - a wrongly implemented Authentication
system. @Joey Hauschildt $this->Auth->user() and the "Auth.User"
Session key should both return/contain the full user information -
i.e. all fields from the users DB table. This behaviour is
stra
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
"In 2.0 $this->Auth->login($this->request->data) will log the user in
with whatever data is posted, whereas in 1.3
$this->Auth->login($this->data) would try to identify the user fi
You could get the size of $result['Post'] if you already have the
$result like you wrote. See count() or sizeof().
Or you could do a find('count') on the Post Model like
$this->User->Post->find('count', array('conditions' =>
array('Post.user_id' => 2)));
On 06/19/2012 12:24 AM, JonStark wrote:
Am 27.10.2010 12:19, schrieb Max D:
Hey,
the RSS feed in the bakery seems to be broken. I worked a while ago,
but now http://bakery.cakephp.org/articles/rss throws an error:
Error: The requested address '/articles/rss' was not found on this
server.
I didn't know who to contact with this issue.
ee for deletion?
On 7 Sep., 14:19, "Max Dörfler" wrote:
rmdir just works on emty directories
NAME
rmdir - remove empty directories
SYNOPSIS
rmdir [OPTION]... DIRECTORY...
DESCRIPTION
Remove the DIRECTORY(ies), if they
rmdir just works on emty directories
NAME
rmdir - remove empty directories
SYNOPSIS
rmdir [OPTION]... DIRECTORY...
DESCRIPTION
Remove the DIRECTORY(ies), if they are empty.
"rm -r" would recursively delete a nonempty directory, but it's a
dangerous c
Hi,
Since it's the login and register action, I bet you have them in
allow(). So the Auth component is disabled for those actions and
isAuthorized is never called. You need to check it somewhere else (e.g.
beforeFilter).
Max
Am 05.09.2010 22:28, schrieb Simon:
I have a isAuthorized functio
This sounds like the default deny message by the Auth component.
(http://book.cakephp.org/view/1250/Authentication)
Putting Auth in the components array locks you out of every action by
default. Look if the Auth component is in your app_controller or some
other controller. To disable Auth for a
Hi,
whats the find call for $user?
what does debug($user); spit out?
Greetings
Max
Am 19.08.2010 20:58, schrieb Tomfox Wiranata:
hi,
weird thing. i declare a hasOne relation:
class User extends AppModel
{
var $name = 'User';
var $hasOne = array(
'Link' => array(
Hi,
see saveAll http://book.cakephp.org/view/1031/Saving-Your-Data
You can create the form which generates the needed output to feed
saveAll like the following:
Form->create('Setting');
foreach ($settings as $key => $setting) {
echo $this->Form->input('Setting.'.$key.'.id', array('value' =
Hi,
that is beacuse when you create the user, the plaintext password gets
encrypted. When you now edit the user, the encrypted password gets
loaded and when you save your user, the encrypted password gets
encrypted again. (so the already encrypted password is handled as if
it's a plaintext pa
Hi,
ich bin mir nicht sicher, ob ich das alles richtig verstehe, kannst du
vielleicht den Code deiner Models (den ganzen hasOne, hasMany, belongsTo
Kram) schicken? Da du dich scheinbar auch nicht so richtig an die
Namenskonventionen hältst, ist das übersichtlicher. :)
Weil z.B. eine "Friend" R
Hey,
I heard of this cool method of writing custom find methods in
tehtreags's bakery post
(http://bakery.cakephp.org/articles/view/model-repletion) and now tried
to use it in a Behavior, but failed.
Im using cake 1.3.0
The Code:
http://pastebin.com/92753BmZ
The Problem:
- I have an articl
Hi,
have a look at File Fields:
http://book.cakephp.org/view/1411/File-Fields
and the FileUpload Component, which does pretty much everything for you.
http://github.com/webtechnick/CakePHP-FileUpload-Plugin
It works with or without a model, but it's all explained in the readme.
Am 22.07.2010 11
Hi Folks,
I Have the following:
Transaction hasMany ArticlesTransaction
Transaction belongsTo Address
ArticlesTransaction belongsTo Article
ArticlesTransaction belongsTo Transaction
ArticlesTransaction belongsTo Shipping
(and some other Associations)
and want to save the following with Transa
And try "registration" in the url, not "registeration"
cheers
Am 12.07.2010 10:30, schrieb nini:
Try
http://localhost/cake1.3.2/users/registeration
and please read manual.
On Jul 12, 1:20 am, Dinu464 wrote:
1) XAMPP 1.7.3 setup and workinghttp://localhost/xampp/-> success
2) Unpacked c
20 matches
Mail list logo