Skip to content

Handle events overview when event definition is missing (6.2)#25737

Draft
ryan-carroll-graylog wants to merge 1 commit into6.2from
backport-6.2/13756-when-an-event-definition-has-been-removed-the-events-overview-widget-will-error-when-trying-to-reference-it
Draft

Handle events overview when event definition is missing (6.2)#25737
ryan-carroll-graylog wants to merge 1 commit into6.2from
backport-6.2/13756-when-an-event-definition-has-been-removed-the-events-overview-widget-will-error-when-trying-to-reference-it

Conversation

@ryan-carroll-graylog
Copy link
Copy Markdown
Contributor

@ryan-carroll-graylog ryan-carroll-graylog commented Apr 20, 2026

Note: This is a backport of #25548 to 6.2.

Description

When an event definition is deleted, the Events Overview widget on the search page would throw errors and show error toast notifications if the event definition column was displayed. This change gracefully handles missing event definitions by falling back to displaying the raw event definition ID — matching the existing behavior on the Alerts page.

Motivation and Context

Fixes graylog-plugin-enterprise#13756

When users delete event definitions, existing events still reference the old definition ID. The EventDefinitionName component would attempt to fetch the deleted definition, get a 404, and the defaultOnError wrapper would display an error toast for every affected row. Additionally, the component returned null for the cell content when displayAsLink was true, leaving empty cells.

Changes

  • EventDefinitionName.tsx: When the event definition fetch fails or returns no data, render the event definition ID as plain text instead of returning null
  • useEventDefinition.tsx (in components/events/events/hooks/): Removed defaultOnError wrapper to prevent error toast notifications on expected 404s; exposed isError from the query
  • EventDetails.test.tsx: Updated mocks to include the new isError field

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

/prd Graylog2/graylog-plugin-enterprise#13967

* Handle case where event definition is missing

* add cl entry

(cherry picked from commit c53ffba)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant