Opened 3 years ago
Closed 3 years ago
#8866 closed defect (bug) (fixed)
Improve unregistered Group Type management
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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)
Note: See
TracTickets for help on using
tickets.
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