Skip to:
Content

BuddyPress.org

#8866 closed defect (bug) (fixed)

Improve unregistered Group Type management

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version: 2.6.0
Component: Groups Keywords: has-patch has-unit-tests
Cc:

Description

When a group type is not registered we are currently trying (without success) to do a 404. In this case the groups directory page loads without informing the user of what's happening.

The existing PHPUnit test is succeeding because it's a wrong copy paste of a member type test. See test_group_directory_should_404_for_group_types_that_have_no_directory().

I think, we should simply inform no groups were found.

Change History (2)

This ticket was mentioned in PR #82 on buddypress/buddypress by @imath.


14 months ago
#1

  • Keywords has-patch has-unit-tests added; needs-patch removed

After more thoughts, I believe we should maintain the way to handle this case as it was first designed. This PR changes how to check a loaded groups directory page is about displaying groups having a specific type to make sure we end up to a 404 if the corresponding group type is not registered or do not support directory filtering.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8866

#2 @imath
14 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13448:

Do 404 when trying to reach a page about an unregistered group type

Improves the way we handle this case making sure we really end up to a
404 if the corresponding group type is not registered or do not support
directory filtering. Update corresponding PHP unit tests to really test
this case instead of a case about a member type.

Closes https://github.com/buddypress/buddypress/pull/82
Fixes #8866

Note: See TracTickets for help on using tickets.