- 🇩🇪Germany donquixote
Patch looks good!
Just for the fun of it, the following would be a shorter version of the compare function and uasort() call:
uasort($permissions, function (array $permission_a, array $permission_b) use ($modules) { return ($modules[$permission_a['provider']] <=> $modules[$permission_b['provider']]) ?: ($permission_a['section'] <=> $permission_b['section']) ?: (strip_tags((string) $permission_a['title']) <=> strip_tags((string) $permission_b['title'])); });
But let's go ahead with the current patch, anything else could be a follow-up.
- 🇳🇱Netherlands Yuri
Patch #2 makes my views blocks disappear that display group content with some group content relations. Did not dig deep in this yet.
Drupal 9.4.10, PHP8.1.14, Using installation profile social-11.7.0-rc1 that uses Group 8.x-1.5 - 🇪🇸Spain joe_carvajal Seville (Spain)
Patch #2 works perfectly for me with these versions:
- PHP 8.1.18
- Drupal 9.5.9
- Group 8.x-1.5But reading the docs I decided to move to Group 2.1, as recommended. By the way, the GroupPermissionHandler.php file has the patch applied there.
- Status changed to Fixed
over 1 year ago 10:54am 7 September 2023 - Status changed to RTBC
over 1 year ago 1:42pm 14 September 2023 - 🇦🇺Australia dpi Perth, Australia
This is not the case for the 1.x series.
3.x was resolved in #3254097: Group's use of uasort returns booleans, switch to spaceship operator. → , though that issue should have been marked as a dupe, as this issue covers multiple branches and predates it.
- 🇮🇳India masoom2206 Greater Noida
Patch in #2 works for me as well. But it not for drupal/group (1.6.0).
So here is the patch for drupal/group (1.6.0) - 🇩🇪Germany zcht
The patch #2 also works excellently under Group 1.6.
@masoom2206 What makes you think it doesn't work? Your patch is, by the way, a 1:1 copy, no difference to patch #2.
- 🇮🇳India masoom2206 Greater Noida
@zcht, The issue is related to line number not match in drupal/group (1.6.0).
sorry for wrong patch uploaded. I have attached here the updated patch for drupal/group (1.6.0). - Status changed to Closed: duplicate
11 months ago 2:34pm 9 January 2024 - 🇦🇹Austria jordik
The patch from #3254097: Group's use of uasort returns booleans, switch to spaceship operator. → applies perfectly to Group 1.6 and was already committed to 3.x.
- 🇺🇸United States MagdalenaA67
#24 /uasort-comparison-3210808-2.patch worked for me. Thank you!