From 480394f3d876af0f1e10db35db8390b3e9d56f64 Mon Sep 17 00:00:00 2001 From: David Gabriel Date: Sat, 9 Sep 2023 19:50:45 +0200 Subject: [PATCH 1/2] [Bugfix] Fix for #4518: SQL query that generates the report list in the admin view needs to include the 'id' field --- app/Http/Controllers/Admin/AdminReportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/AdminReportController.php b/app/Http/Controllers/Admin/AdminReportController.php index 4924acfa8..311eac220 100644 --- a/app/Http/Controllers/Admin/AdminReportController.php +++ b/app/Http/Controllers/Admin/AdminReportController.php @@ -643,7 +643,7 @@ trait AdminReportController $q->whereNull('admin_seen') : $q->whereNotNull('admin_seen'); }) - ->groupBy(['object_id', 'object_type']) + ->groupBy(['id', 'object_id', 'object_type']) ->cursorPaginate(6) ->withQueryString() ); From 2e5c141724a78fb9de1a6b2bce947f8e27506703 Mon Sep 17 00:00:00 2001 From: David Gabriel Date: Sat, 9 Sep 2023 20:46:50 +0200 Subject: [PATCH 2/2] Fix similar SQL error which triggers when mentioning people in new posts --- app/Http/Controllers/ComposeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 54526ffe8..9be50f346 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -415,7 +415,7 @@ class ComposeController extends Controller $results = Profile::select('id','domain','username') ->whereNotIn('id', $blocked) ->where('username','like','%'.$q.'%') - ->groupBy('domain') + ->groupBy('id', 'domain') ->limit(15) ->get() ->map(function($profile) {