Forum
Perch Members missing properties when added
When I attempt to add Members manually through the admin, member properties (specifically first name and last name) do not save. If I go back and edit the record, they are then saved.
I'm experiencing this in my local environment, running PHP: 5.6.1, MySQL: 5.5.38, and my staging environment, running PHP: 5.4.13, MySQL: 5.5.30. Both have the most recent Perch installed.
Thanks!
Is this the most recent version of the Members App?
Can we see your template?
It's 1.1, downloaded today. The template for which? It's the admin's "Add Member" form.
That's based on the
member.html
template.Oh, gotcha. That's unchanged:
<perch:members type="text" id="first_name" label="First name" listing="true" order="1" /> <perch:members type="text" id="last_name" label="Last name" listing="true" order="2" />
If you turn on debug, do you get any error messages when the save fails?
No, it saves and redirects to the edit page with no problem, except that the first name and last name are still empty. Nothing in debug since there's never an error.
I'll see if I can reproduce it.
Found this on line 77 of members.edit.pre.php:
$data['memberProperties'] = '';
This is emptying the memberProperties on a new member. Commenting it out fixes the problem.
You're right. Thanks.
I'm experiencing the same issue (first name and last name are not saved upon creation, they are saved when editing). Should I also edit members.edit.pre.php or is it better to wait for an official fix?