[2.x] Audit's discussion and user filters fail on PostgreSQL
Maintainer thường phản hồi trong vòng 1 ngày
@imorland đang làm issue này rồi.
Từ ngày 23/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Current Behavior
On PostgreSQL, filtering the audit log by discussion returns a 500:
SQLSTATE[42703]: Undefined column: 7 ERROR: column "$.discussion_id" does not exist
extensions/audit/src/Search/Filter/DiscussionFilter.php compares json_extract(payload, "$.discussion_id"). That is MySQL's JSON syntax: PostgreSQL has no json_extract(), and it reads the double-quoted path as a column name. UserFilter.php builds json_extract(payload, "$.user_id") the same way, so the user filter should fail too (from reading the code, not reproduced).
The discussion and user audit modals open the audit browser with discussion:<id> and user:<username>, so on PostgreSQL those modals should fail to load (also from reading the code).
Steps to Reproduce
- Run Flarum on PostgreSQL with
flarum/auditenabled. - As an admin, request
GET /api/audit?filter[discussion]=1. - The response is a 500 with the error above.
Expected Behavior
The audit entries for that discussion (or user), as on MySQL.
Environment
- Flarum:
2.x@ b43a84be3 - Database: PostgreSQL 18
Possible Solution
Build the JSON path per driver, e.g. with the query grammar's JSON support (payload->discussion_id through where/whereIn on a JSON column), or payload::jsonb->>'discussion_id' on PostgreSQL.
- Ngôn ngữ chính
- PHP
- Star
- 6.8k
- Fork
- 891
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 209
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flarum/framework
-
type/accessibility type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Default language is ignored for anyone who chose a language, when the language selector is hiddenCó thể đã có người làm @1AbdullahButt đã nhận 15 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.x] False CLI/Web PHP mismatch when /usr/bin/php differs from the site's FPMCó thể đã có người làm @lazerg đã nhận 15 ngày trước. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.x] A filter on a resource without a searcher returns a 500Có thể đã có người làm @imorland đã nhận hôm nay. Đang mởtype/bug
flarum/framework#5578 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của flarum/framework
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
Sylius/Sylius#19359 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add php 8.6Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
mailersend/mailersend-php#199 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Tool: somcp_delete_currencyĐang mởConfiguration new tool
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
novalo-dev/Prestashop-MCP-Server#366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 10 ngày