27;]);
}
$this->Session->setFlash("Utilisateur non enregistré. Vérifiez les erreurs
ci-dessous.", "fe");
}
}
else {
//new user/
if ($new_user){
$this->loadModel("UserProfile");
$max_member_number_temp = $this->UserProfile->find('first',
array("recursive" => -1, "order" => "UserProfile.member_number DESC",
"limit" => 1));
$this->data['UserProfile']['member_number'] =
$max_member_number_temp['UserProfile']['member_number'] + 1;
$this->data['UserProfile']['member_since'] = date("Y-m-d");
$this->data['UserProfile']['membership_expiry'] = date("Y-m-d",
strtotime("+ 1 year"));
$this->set('crumb', array("Utilisateurs" => array("action" =>
"view_all_users"), "Nouvel utilisateur" => array()));
}
//edit user/
else {
$this->data = $this->User->find('first', array('conditions' =>
array("User.user_id" => $id)));
$this->set('crumb', array("Utilisateurs" => array("action" =>
"view_all_users"), "# " . $id => array("action" => "user_edit11", $id)));
}
}
$this->_get_countries();
$this->_get_regions();
$this->_get_companies();
$this->_get_main_activity_fields();
$this->_get_expertises();
$this->_get_circus_fields();
$this->_get_membertypes();
}
If I am not in the right place, please let me know where I should be
looking for the user_edit function. NOTE, the same issue happens for users
(non admin) when they edit their profile or other info. Add works, edit
does not... so I'm a little lost :)
Any help would be great. I will also post this thread to
http://discourse.cakephp.org
<http://www.google.com/url?q=http%3A%2F%2Fdiscourse.cakephp.org&sa=D&sntz=1&usg=AFQjCNGL9LcHnec4kXVwy2zvgNpAUvYWrA>
to
see if anyone else there can lend a hand as well.
Thank you,
josh
On Monday, May 2, 2016 at 9:12:56 PM UTC-4, Reuben wrote:
>
> Hi Josh
>
> What URL is actually getting posted when the form is submitted?
>
> My only concern is that $this->params["action"] is not populated with the
> value you are expecting.
>
> I'm guessing that you are expecting the values of that variable to be
> either add, edit, create or update.
>
> What are the signatures of those methods in the controller?
>
> Usually an add function will just be `function add()`, but an edit
> function might be `function edit($id)`, in which case, the POST will fail,
> because the action is not providing an id on the URL (i.e. /users/edit is
> requested instead of /users/edit/1).
>
> And last but not least, it looks like these forums are being wound down.
> Head over to http://discourse.cakephp.org for CakePHP discussions. (but
> still reply to this topic, if you need to)
>
> Regards
> Reuben Helms
>
> On Tuesday, 3 May 2016 07:42:07 UTC+10, Josh R wrote:
>>
>> Hello Group,
>>
>> I am new to this group and CakePHP.
>>
>> I am dealing with a site that is build using CakePHP version 1.3.8. When
>> adding a new user, everything works fine. When modifying a user (either
>> through admin's account or through the user's account) the save function
>> keeps the URL of the page (with client ID in url as it should) but the page
>> doesn't add the updated data to the database, and gives a 404 page. When
>> the URL is copied and entered again in browser the User's page appears, but
>> like I mentioned no changes to the User's information was recorded. See the
>> start and end of the form functions, there are a lot of fields in this form.
>>
>> Form->create("User", array("url" => array("controller"
>> => "admin", "action" => $this->params["action"]))); ?>
>> *There are many fields > echo $this->Form->input("...");, etc...*
>> Form->end("Enregistrer"); ?>
>>
>> I was told that this form was working properly a couple months ago (I
>> just recently have been looking into this issue), and then one day the
>> saving of the form stopped.
>>
>> Any help is greatly appreciated. I can also send snippets of code if need
>> be.
>>
>> Thank you in advance!
>> josh
>>
>
--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
We will soon be closing this Google Group. But don't worry, we have something
better coming. Stay tuned for an updated from the CakePHP Team soon.
Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.