Current Behavior
When creating or editing a Discord webhook from a server's Webhooks page, the Discord-specific fields are not persisted.
The following fields can be entered in the UI:
- Username
- Avatar URL
- Message / Content
- Forum Thread Name
- Flags
- Allowed Mentions
- Embeds
After saving the webhook and opening it again, all of these fields are empty.
Only the following values are persisted:
- Endpoint
- Webhook name
- Selected events
- Type
The database entry confirms that the Discord webhook is stored with payload = NULL.
Example:
type = discord
payload = NULL
events = ["server:power.start","server:power.stop",...]
When the webhook is triggered, Pelican correctly detects the event, but Discord rejects the request because the message payload is empty:
HTTP request returned status code 400:
{"message": "Cannot send an empty message", "code": 50006}
Pelican then also logs:
SQLSTATE[23000]: Integrity constraint violation:
NOT NULL constraint failed: webhooks.payload
The webhook itself and the event handling appear to work correctly.
As a workaround, manually setting the payload column in SQLite makes the Discord webhook work immediately, for example:
{
"username": "Valheim-Server",
"content": "Valheim-Server: {{event}}"
}
After manually inserting this payload, both server:power.start and server:power.stop successfully send messages to Discord.
However, saving the webhook again through the server Webhooks UI removes or loses the payload again.
Expected Behavior
Discord-specific webhook fields entered in the server Webhooks UI should be stored in the webhook configuration's payload.
When reopening the webhook, the previously configured values should be populated in the form again.
For example, entering:
- Username:
Valheim-Server
- Message:
Valheim-Server: {{event}}
should result in a persisted payload similar to:
{
"username": "Valheim-Server",
"content": "Valheim-Server: {{event}}"
}
The configured payload should then be sent when one of the selected events is triggered.
Steps to Reproduce
- Open a server in Pelican.
- Go to Webhooks.
- Create a new webhook or edit an existing webhook.
- Select Discord as the webhook type.
- Enter a valid Discord webhook endpoint.
- Enter a webhook name.
- Enter values in the Discord-specific fields, for example:
- Username:
Valheim-Server
- Message:
Test message {{event}}
- Select an event such as:
Power → Start
Power → Stop
- Save the webhook.
- Open the webhook again.
Result:
The Discord-specific fields are empty again.
Checking the SQLite database shows:
SELECT id, name, type, payload
FROM webhook_configurations;
The webhook has:
type = discord
payload = NULL
- Trigger
Power → Start or Power → Stop.
Pelican triggers the webhook event, but Discord returns:
400 Cannot send an empty message
-
Manually set a payload in the database:
UPDATE webhook_configurations
SET payload = '{"username":"Valheim-Server","content":"Valheim-Server: {{event}}"}'
WHERE id = 1;
-
Trigger the server event again.
The Discord webhook now works correctly.
Additional Information
The Admin webhook implementation appears to contain explicit logic for transforming the Discord form fields into payload and restoring them when editing (mutateFormDataBeforeCreate, mutateFormDataBeforeSave, and mutateFormDataBeforeFill).
The server-scoped webhook UI exposes the same Discord fields, but the resulting webhook configuration does not persist the payload.
This may indicate that the corresponding form-data mutation logic is missing for server-scoped webhooks.
Panel Version
1.0.0-beta38
Wings Version
1.0.0-beta29
Games and/or Eggs Affected
Valheim BepINex
Docker Image
ghcr.io/parkervcp/games:valheim
Error Logs
https://logs.pelican.dev/3b8ff6dd
Is there an existing issue for this?
Current Behavior
When creating or editing a Discord webhook from a server's Webhooks page, the Discord-specific fields are not persisted.
The following fields can be entered in the UI:
After saving the webhook and opening it again, all of these fields are empty.
Only the following values are persisted:
The database entry confirms that the Discord webhook is stored with
payload = NULL.Example:
When the webhook is triggered, Pelican correctly detects the event, but Discord rejects the request because the message payload is empty:
Pelican then also logs:
The webhook itself and the event handling appear to work correctly.
As a workaround, manually setting the
payloadcolumn in SQLite makes the Discord webhook work immediately, for example:After manually inserting this payload, both
server:power.startandserver:power.stopsuccessfully send messages to Discord.However, saving the webhook again through the server Webhooks UI removes or loses the payload again.
Expected Behavior
Discord-specific webhook fields entered in the server Webhooks UI should be stored in the webhook configuration's
payload.When reopening the webhook, the previously configured values should be populated in the form again.
For example, entering:
Valheim-ServerValheim-Server: {{event}}should result in a persisted payload similar to:
The configured payload should then be sent when one of the selected events is triggered.
Steps to Reproduce
Valheim-ServerTest message {{event}}Power → StartPower → StopResult:
The Discord-specific fields are empty again.
Checking the SQLite database shows:
The webhook has:
Power → StartorPower → Stop.Pelican triggers the webhook event, but Discord returns:
Manually set a payload in the database:
UPDATE webhook_configurations
SET payload = '{"username":"Valheim-Server","content":"Valheim-Server: {{event}}"}'
WHERE id = 1;
Trigger the server event again.
The Discord webhook now works correctly.
Additional Information
The Admin webhook implementation appears to contain explicit logic for transforming the Discord form fields into
payloadand restoring them when editing (mutateFormDataBeforeCreate,mutateFormDataBeforeSave, andmutateFormDataBeforeFill).The server-scoped webhook UI exposes the same Discord fields, but the resulting webhook configuration does not persist the payload.
This may indicate that the corresponding form-data mutation logic is missing for server-scoped webhooks.
Panel Version
1.0.0-beta38
Wings Version
1.0.0-beta29
Games and/or Eggs Affected
Valheim BepINex
Docker Image
ghcr.io/parkervcp/games:valheim
Error Logs
Is there an existing issue for this?