Skip to:

Opened 10 years ago

Closed 9 years ago

#5854 closed defect (bug) (fixed)

Groups admin: Updating a group entry with empty description throws an error message

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile r-a-y
Milestone: 2.2 Priority: normal
Severity: normal Version: 1.7
Component: Groups Keywords: has-patch 2nd-opinion commit


If you're in the Groups admin dashboard and you want to edit a group's description to a blank string, on save, an error message is displayed.

However, if you wiped out the group description and you added a new member, the error message is still displayed, but the member is saved correctly.

This can cause confusion, so the attached patch allows groups_edit_base_group_details() to accept an empty group description so the error message will not be shown unnecessarily.

Attachments (3)

5854.01.patch (1.8 KB) - added by r-a-y 10 years ago.
5854.02.patch (2.4 KB) - added by DJPaul 9 years ago.
5854.03.patch (1.5 KB) - added by r-a-y 9 years ago.

Download all attachments as: .zip

Change History (11)

10 years ago

#1 @boonebgorges
10 years ago

Patch seems fine, but my conservative side is saying that this is not a regression in 2.1 or 2.0, so we should push to 2.2.

#2 @r-a-y
10 years ago

  • Keywords early added
  • Milestone changed from 2.1 to 2.2

That's fine with me.

#3 @DJPaul
9 years ago

  • Keywords commit added

9 years ago

#4 @DJPaul
9 years ago

  • Keywords 2nd-opinion added; early commit removed

I have updated the patch so it applies, but upon testing, I don't think we should add this patch. Group Description, in the theme compat templates, is marked as a required field, and this change (obv) allows empty values.

#5 @r-a-y
9 years ago

Group Description, in the theme compat templates, is marked as a required field, and this change (obv) allows empty values.

Good catch. Would really be swell if we could switch to WP_Error for these types of things.

The alternative is changing the group edit template to remove the 'required' string, but that's probably a no-go.

So do we want to fix up the admin notice to be more specific? If so, 03.patch does this in a workaround manner in the admin area since we can't use WP_Error in groups_edit_base_group_details().

9 years ago

#6 @DJPaul
9 years ago

  • Keywords commit added

Looks good

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.

9 years ago

#8 @r-a-y
9 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 9321:

Groups Admin: Add better contextual errors when editing a group.

Previously, when attempting to save an empty group title or description,
the error message was ambiguous, which could lead to confusing situations.

This commit addresses this (albeit in a workaround way - feel free to yell
at r-a-y for this one).

Fixes #5854.

Note: See TracTickets for help on using tickets.