
π§ v2.0.0-beta.3 - Rollback Fix
This release fixes a rollback functionality issue reported after beta.2.

π Bug Fix
Fixed: Revision history corruption during rollback
When rolling back to a previous revision, the revision being rolled back from was not being preserved correctly in the history. This caused the rolled-back revision's content to disappear from the history. (navindra )
Example of the bug:
- Post edited:
123 β 456 β 789
- Rollback to original (
123)
- β Before fix: History showed
123 β 456 β 123 (missing 789)
- β
After fix: History shows
123 β 456 β 789 β 123
Root cause: In Flarum 2.x, the EditPost command was removed and replaced with the new Resource-based API. The previous implementation wasn't capturing the correct oldContent value before dispatching the Revised event.
Changes made:
RollbackToDiffHandler.php: Now captures current content before modification and dispatches Revised event with correct oldContent
PostActions.php: Now prefers $event->oldContent from the Revised event for more reliable revision tracking
π§ Installation
composer require huseyinfiliz/flarum-diff:"*"
π Update
composer update huseyinfiliz/flarum-diff
php flarum cache:clear
π Links
π‘ Feedback & Suggestions
Feel free to share your ideas, report bugs, or request features in the discussion thread!