#5576 closed defect (bug) (fixed)
Add New Group - description not being saved
Reported by: | shanebp | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.0.1 | Priority: | high |
Severity: | normal | Version: | 2.0 |
Component: | Groups | Keywords: | |
Cc: |
Description
WP 3.9 - 2012 theme
Add New Group -> Group Description must be filled out to proceed to next screen.
The group is created, but the description is not saved.
It does not appear on the 'front' group screen
or in the /wp-admin/admin.php?page=bp-groups&gid8&action=edit
While on the wp-admin screen, if you don't notice that the description field is empty and do 'Save Changes', the result is this message:
"An error occurred when trying to update your group details."
Which can be confusing.
Entering some text into the Edit > Group description field on either front OR wp-admin screen and then saving works properly.
So the issue is just with the Add New Group > Description field.
Confirmed. This is a regression in 2.0, introduced in r8157. In that changeset, the logic used when a
groups_create_group()
is called with an existinggroup_id
is changed. When no 'name' or 'slug' parameters are passed, the existing properties by those names are preserved. But the same does not happen for descriptions: if no value is passed to 'description', an empty string will overwrite the original description. This causes problems during the normal group creation workflow, becausegroups_create_group()
is called twice: once after the first step (when name, slug, and description are created) and once after the second step (to save group-settings).