Skip to content

[Bug] 4.2.0 - FreeMarker template error: sendEnabled is null or missing in message-inspector.ftlh when sending message #860

Description

@raphael-pee

Bug Report: FreeMarker template error when sending message - sendEnabled null or missing

Version: 4.2.0

Description:
When attempting to send a message to a topic via the UI, a FreeMarker template error occurs because sendEnabled evaluates to null or missing in message-inspector.ftlh at line 95.

Despite the error, the message is successfully sent — so this appears to be a rendering issue after submission rather than a functional failure.

Error:

FreeMarker template error: The following has evaluated to null or missing:
==> sendEnabled [in template "message-inspector.ftlh" at line 95, column 12]
----
Failed at: #if sendEnabled [in template "message-inspector.ftlh" at line 95, column 7]

Steps to Reproduce:

  1. Start Kafdrop 4.2.0 with --message.sendEnabled=true
  2. Navigate to a topic
  3. Click "Send Message" and submit
  4. FreeMarker template error page is displayed

Expected Behavior:
Message is sent and the UI renders normally without error.

Actual Behavior:
Message is sent successfully, but a FreeMarker template error is displayed because sendEnabled is not passed to the template in this request flow.

Configuration:

CMD_ARGS: --message.sendEnabled=true

Environment:

  • Kafdrop version: 4.2.0
  • Deployment: Kubernetes
  • Java: from Docker image obsidiandynamics/kafdrop:4.2.0

Possible Fix:
Ensure sendEnabled is included in the model passed to message-inspector.ftlh for all request flows, not just the initial page render.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions