Custom "post button" generates error when post is in deleted state

Priority/Severity:

Medium

Platform:

Operating System

Windows 11

Browser

Google Chrome 152.0.7977.83

Discourse

ed00bce10a9e2ad5f12f6ae6b3a229bb62cf2d2b

Description:

The Discourse Workflows core plugin has support for triggering a workflow run via a “post button”, which is an additional icon added to the row present under posts.

When a post is “deleted”, it remains accessible to staff members. Post buttons are still present on these posts, and are useful for performing certain operations.

:bug: If a post is in a deleted state, clicking a custom post button added by a Workflow only produces a dialog containing an error message:

An error occurred: The requested URL or resource could not be found.

Reproducible steps:

  1. Click the following link to download the importable source for a simple demonstration Workflow:
    workflow-nodes-2026-09-10.json (901 Bytes)
  2. Navigate to the Workflows plugin administration page (/admin/plugins/discourse-workflows/workflows) on a forum where you have admin permissions.
  3. Click the “+ New workflow” button.
  4. Click the button located near the top right hand corner of the Workflow canvas.
    A menu will open.
  5. Select “Import” from the menu.
    The “Open” dialog will open.
  6. Select the downloaded file in the dialog.
  7. Click the “Open” button in the dialog.
    The workflow will be populated with a “Post button” trigger step.
  8. Click the “Publish” button at the top of the workflow canvas.
  9. Delete any post.
  10. Click the frowny face icon at the bottom of the deleted post.

:bug: A dialog containing an error message appears. The workflow is not triggered.