[1.x & 2.x] Discussion Metadata Stale after GDPR Erasure Request processed in deletion mode
Author: DavideIadelucaCreated Aug 28, 2026Updated Sep 15, 2026
Labelstype/bug
Current Behavior
When GDPR Deleting a user, posts are bulk deleted like this:
Bulk deletion like this skips over the events needed to keep the discussions in sync and retain data integrity
Steps to Reproduce
- Create a new test user
- Start a few discussions, reply to some other discussions
- Request GDPR Erasure as that testing user
- Confirm the erasure request by that testing user
- Process the erasure request as an admin
Expected Behavior
Flarum Events should be dispatched (dispatchEventsFor()) which in turn would get listened to by the DiscussionMetadataUpdater.
Screenshots
No response
Environment
- Flarum version: 1.8.17
- Website URL: n.a.
- Webserver: n.a.
- Hosting environment: n.a.
- PHP version: 8.3.32
- Database 10.11.15 MariaDB
- Browser: n.a.
Output of php flarum info
No response
Possible Solution
No response
Additional Context
I didn't test this locally against the 2.x version, however the implementation is the same there. Changing this behaviour is a technically a breaking change and ideally is done just for the 2.x branch, before 2.0.0 stable is released.
Source: flarum/framework