# Possible post\_edited Event Regression issue?

**URL:** https://meta.discourse.org/t/possible-post-edited-event-regression-issue/393563
**Category:** Support
**Tags:** automation
**Created:** [January 15, 2026, 4:09pm UTC](https://meta.discourse.org/t/possible-post-edited-event-regression-issue/393563 "2026-01-15T16:09:51Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Neil\_Evans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil_evans/32/511055_2.png) [@Neil\_Evans](https://meta.discourse.org/u/Neil_Evans)
#### Post date: [January 15, 2026, 4:09pm UTC](https://meta.discourse.org/t/possible-post-edited-event-regression-issue/393563/1 "2026-01-15T16:09:51Z")

</div>

# Discourse Bug Report: `:post_edited` Event Regression in latest-release

**Affects:** Discourse `latest-release` branch (release +122)  
**Status:** Confirmed regression - reproducible  
**Date:** January 15, 2026

* * *

## Summary

The `:post_edited` DiscourseEvent stopped being published in recent `latest-release` builds. Post edits complete successfully and revisions are created, but the event that plugins depend on is never fired. This breaks all plugins using the `post_created_edited` automation trigger and any other plugins listening to `:post_edited` events.

* * *

## Reproduction (Confirmed)

We confirmed this is a regression by testing on two identical Azure AKS environments:

### Before Update (Working)

- **Version:** `v2026.1.0-latest` (older build)
- **Behavior:** ✅ `:post_edited` events fire correctly
- **Automation:** ✅ Works automatically

### After Update (Broken)

- **Version:** `latest-release +1221 hours ago, release +122`
- **Behavior:** ❌ `:post_edited` events never fire
- **Automation:** ❌ Completely broken

**Critical Finding:** Both environments worked before update. Both broke after updating to `latest-release +122`. This definitively proves a regression was introduced.

* * *

## Environment Details

- **Discourse Version:** `latest-release` (release +122)
- **Rails Version:** 8.0.4
- **Infrastructure:** Azure Kubernetes Service (AKS)
- **Docker Image:** discourse/base:2.0.20260109-0020
- **Deployment:** Standard Discourse Docker installation

* * *

## Test Procedure

### Test 1: Event Listener (Proves Event Never Fires)

```ruby
# In Rails console
File.open('/tmp/post_edited_test.log', 'w') { |f| f.write("Test started at #{Time.now}\n") }

DiscourseEvent.on(:post_edited) do |post, topic_changed, revisor|
  File.open('/tmp/post_edited_test.log', 'a') do |f|
    f.write("[#{Time.now}] :post_edited fired! Post #{post.id}\n")
  end
end

```

Then edit any post via web interface and check:

```bash
cat /tmp/post_edited_test.log

```

**Result on `latest-release +122`:** Only shows “Test started” - event never fires  
**Result on older build:** Shows event entries with timestamps and post IDs

### Test 2: Verify Revisions Are Created

```ruby
post = Post.find(POST_ID)
puts "Post revisions: #{post.revisions.count}"
post.revisions.last(3).each { |rev| puts " Revision #{rev.number}: #{rev.created_at}" }

```

**Result:** Revisions ARE created correctly with proper timestamps  
**Conclusion:** Edits are processed successfully, but `post_process_post` isn’t being called or event isn’t being triggered

### Test 3: Manual Event Trigger (Proves Event System Works)

```ruby
post = Post.find(POST_ID)
DiscourseEvent.trigger(:post_edited, post, false, PostRevisor.new(post))

```

**Result:** Event handlers execute correctly  
**Conclusion:** Event system works, but automatic triggering during edits is broken

* * *

## Expected Behavior

When a post is edited via web interface:

1. Edit saves successfully ✅
2. Post revision created ✅
3. `PostRevisor#post_process_post` is called ❌
4. `:post_edited` event triggered ❌
5. Event handlers execute ❌

**Only steps 1-2 work. Steps 3-5 are broken.**

* * *

## Actual Behavior

Production logs show successful edit completion:

```plaintext
Started PUT "/posts/3631" for 88.97.179.124 at 2026-01-15 13:06:19 +0000
Processing by PostsController#update as JSON
Completed 200 OK in 676ms

```

**No errors, no exceptions, but no `:post_edited` event published.**

The event should be triggered in `/var/www/discourse/lib/post_revisor.rb` line 759:

```ruby
def post_process_post
  @post.invalidate_oneboxes = true
  @post.trigger_post_process
  DiscourseEvent.trigger(:post_edited, @post, self.topic_changed?, self)
end

```

This method is called from line 341 but the event is not being fired.

* * *

## Impact

### Affected Official Features

- **Discourse Automation:** `post_created_edited` trigger completely broken
- Any automation workflows depending on post edits fail silently

### Affected Plugins

All plugins listening to `:post_edited` events are broken:

- **discourse-automation** - Official automation triggers
- **discourse-ai** - AI moderation on edited posts
- **discourse-doc-categories** - Documentation index updates
- **discourse-topic-voting** - Vote reclaim workflows
- **Any custom plugins** using post edit events

* * *

## Regression Timeline

1. **Older build:** `v2026.1.0-latest` - `:post_edited` events worked ✅
2. **Updated to:** `latest-release` (release +122) - `:post_edited` events broken ❌
3. **Confirmed on:** Two separate production environments (both broke after update)

**This definitively proves a regression was introduced in recent `latest-release` builds.**

* * *

## Workaround

Manual triggering via Rails console works:

```ruby
automation = DiscourseAutomation::Automation.find(AUTOMATION_ID)
post = Post.find(POST_ID)
automation.trigger!({"post" => post})

```

This confirms the automation system itself works - only automatic event triggering is broken.

* * *

## Configuration Notes

- **Settings verified:** All editing-related settings are standard/default
- **Grace period:** Tested with edits well outside grace period (no effect)
- **Plugins:** 50 plugins installed (standard official plugins)
- **No core modifications:** Clean Discourse installation
- **Environment:** Both test environments are identical Azure AKS deployments

* * *

## Key Evidence

**Most Important Finding:**

> We had a working DEV environment on an older build. After updating to `latest-release +122`, the automation stopped working. This proves with certainty that a regression was introduced in recent releases.

Both environments now exhibit identical broken behavior after being on the same version.

* * *

## Reproducibility

**100% reproducible** - tested on two independent environments:

1. Install Discourse `latest-release` (release +122)
2. Create automation with `post_created_edited` trigger
3. Edit a post
4. Observe automation never triggers
5. Confirm `:post_edited` event never fires using test listener

* * *

## Summary

This is a **confirmed regression** in `latest-release` (release +122). The `:post_edited` event worked in previous versions and stopped working after updating. Two independent environments confirmed the same behavior. This breaks core Discourse Automation functionality and all plugins depending on post edit events.

---

_[View the full topic](https://meta.discourse.org/t/possible-post-edited-event-regression-issue/393563)._
