---
title: "Drupal error tracking: bug reports, PHP errors and the Drupal log — bugd.one"
description: "The bugd.one module for Drupal 10 and 11: report button, JavaScript errors, PHP errors and log entries from cron and Drush – CSP-friendly, with no impact on loading time."
url: https://bugd.one/guides/drupal-error-tracking?lang=en
language: en
updated: 2026-11-28
type: guide
author: Eduard Ditler
alternate_de: https://bugd.one/guides/drupal-error-tracking
alternate_en: https://bugd.one/guides/drupal-error-tracking?lang=en
---
Guide · Last updated: 2026-11-28

# Drupal error tracking: bug reports, PHP errors and the Drupal log

The bugd.one module for Drupal 10 and 11: report button, JavaScript errors, PHP errors and log entries from cron and Drush – CSP-friendly, with no impact on loading time.

Language: [Deutsch](https://bugd.one/guides/drupal-error-tracking)

> **In short**
>
> - The **bugd.one** module for **Drupal 10 and 11** adds a report button to your website and optionally captures **JavaScript errors** and **PHP errors** including **log entries of level “error” and above** – on pages, in the admin area and in Drush.
> - Install the ZIP into `web/modules/custom/` or via Composer, then enable it under **Extend**.
> - Settings under **Configuration → Web services → bugd.one**; check with **“Save and send test error”** or `drush bugdone:test`.
> - CSP-friendly without `'unsafe-inline'`, server key not in the configuration export, no data from your user accounts.

Failed cron runs, e-mails that don't go out or exceptions in a contrib module end up in Drupal's database log – where rarely anyone reads them in time. The bugd.one module reports these errors to your dashboard, identifies the affected module and lets visitors report problems themselves. Your theme stays untouched.

## Prerequisites

- **Drupal 10 or 11**, PHP 8.1 or newer. Tested on Drupal 11.4. The test command needs **Drush 12 or 13**.
- A bugd.one account: new accounts try all Pro features free for 7 days, no credit card. Then Pro (€9.90) or Team (€29.90) per month (incl. VAT). Without an active plan bugd.one accepts no new reports or crashes.
- A project with its **project key** (`bk_live_…`) from **Project → Settings**, plus the **server key** (`bk_server_…`) for PHP errors.
- The module (version 1.3.1): [bugdone-drupal.zip](https://bugd.one/downloads/bugdone-drupal.zip).

## Step by step

### Step 1: Install the module

**Without Composer:** unpack the ZIP and upload the `bugdone` folder to `web/modules/custom/` (older installations without `web/`: `modules/custom/`).

**With Composer:** copy the `bugdone` folder to e.g. `packages/bugdone` and add it as a local package:

```bash
composer config repositories.bugdone '{"type": "path", "url": "packages/bugdone", "options": {"symlink": false}}'
composer require mignuti/drupal-bugdone:@dev
```

### Step 2: Enable the module

Open **Extend**, search for “bugd.one”, tick it and click **Install**. Or with Drush:

```bash
drush pm:install bugdone
```

### Step 3: Set the project key and features

Open **Configuration → Web services → bugd.one** (`/admin/config/services/bugdone`). You need the “Administer bugd.one” permission.

In the **Report button and JavaScript errors** section, enter the **Project key**, tick **Capture JavaScript errors** if you want it and choose your privacy policy under **Privacy policy page**. Save with **Save configuration**. Drupal clears the affected pages itself when you save.

![Drupal: Configuration → Web services → bugd.one with project key, report button, audience and JavaScript errors](https://bugd.one/screenshots/plugin-drupal-settings.webp)
*Drupal: under Configuration → Web services → bugd.one, paste the project key, choose the features, save.*

### Step 4: Turn on PHP errors (optional)

In the **PHP errors** section, tick **Report PHP errors to bugd.one** and enter the **Server key** (`bk_server_…`). Optionally **Also report warnings** – this can be noisy. The form never shows the saved key again; remove it with **Delete the saved server key**.

### Step 5: Test the connection

Click **Save and send test error** or run:

```bash
drush bugdone:test
```

The test error appears in bugd.one under **Crashes** (filter: development) and triggers no notifications. The message also tells you if the key is wrong or the plan is missing. If your bugd.one project keeps a list of allowed domains, add your website's domain there.

## What is captured

| Source | What is reported | Needs |
| --- | --- | --- |
| Report button | text and screenshot from the visitor (password and payment fields blacked out) | project key |
| Browser | uncaught JavaScript errors with the last steps before them | project key |
| PHP | uncaught exceptions, PHP errors and fatal errors, optionally warnings | server key |
| Drupal log | everything of level “error” and above, e.g. failed cron runs or e-mails | server key |

PHP errors are captured on pages, in the admin area and in Drush. The module identifies the affected module or theme. “Page not found” (404), “access denied” (403) and other client errors are never sent. Sent are the error message and type, the stack trace with paths relative to the project and without arguments, the log channel and level, the page path without query string, the request type and the PHP and Drupal versions. Drupal's own logging (database log, syslog) keeps running unchanged.

![Crash detail with origin (app, environment, version, device, page) and key figures](https://bugd.one/screenshots/docs-crash-origin.webp)
*Crash detail: origin at a glance, plus occurrences, affected users, first seen and release.*

## Settings at a glance

The form has four sections: **Report button and JavaScript errors**, **Appearance of the report button**, **Environment, release and host** and **PHP errors**.

| Field | Meaning |
| --- | --- |
| **Project key** | `bk_live_…`. Without a valid key the module outputs nothing. |
| **Show the report button** | Report button on/off (default: on). Error tracking also works without the button. |
| **Show the report button to** | **Everyone**, **Logged-in users only** or only roles with the **See the bugd.one report button** permission (for testing; granted under **People → Permissions**). |
| **Capture JavaScript errors** | Crash reporter on all pages (default: off). |
| **Privacy policy page** | The page of your privacy policy. The form links it next to the consent. Please set it. |
| **Button style / position / Primary color** | Look of the button. |
| **Environment** | **Automatic** detects the environment (see below). Only production triggers e-mails, webhooks and chat messages. |
| **Release / Host** | Release is optional and defaults to the Drupal version. Only change the host for self-hosting or tests. |
| **Report PHP errors to bugd.one / Server key / Also report warnings** | See step 4. |

The report button never appears on admin pages. Override values per server in `settings.php` as usual, e.g. `$config['bugdone.settings']['environment'] = 'staging';`.

## Environments and test systems

With **Automatic**, the module detects the environment on **Platform.sh/Upsun, Lagoon, Pantheon and Acquia** and reports development under **DDEV** and **Lando**. If Drupal shows error messages with backtrace (“verbose”), that also counts as development. Local and private hosts (`localhost`, `*.local`, `*.test`, private IPs) are reported as development automatically. Reports from development and staging appear in the dashboard with a marker but trigger no e-mails, webhooks or chat messages.

## Page speed

The crash reporter (about 9 KB compressed) loads with `defer` and `preconnect` and never blocks rendering. Errors that happen before it starts are buffered and reported afterwards. The report button loads only after the `load` event. The server sends PHP errors only after the response has gone to the visitor, for at most 2 seconds; the same error at most every 5 minutes, at most 30 reports per 10 minutes.

## Privacy

As the website operator you are the controller; bugd.one (Mignuti Media) processes the data on your behalf. Mention bugd.one in your privacy policy and conclude the [data processing agreement](https://bugd.one/datenschutz/avv).

- **Report button** (only when a visitor submits): text, optional screenshot (password and payment fields blacked out), name and e-mail address only with consent, page address without parameters, browser and operating system, recent console errors and failed requests.
- **JavaScript errors** (for all visitors, when enabled): error message, stack trace, page address without parameters, browser and operating system, environment and release.
- **PHP errors** (from the server, when enabled): as described above. E-mail addresses, tokens, API keys, passwords, one-time login links and database query arguments in error messages are replaced before sending.
- **Not transmitted:** data from your user accounts (no user ID, name or e-mail address), cookies, form input, IP addresses. The module sets no cookies and assigns no visitor IDs.

The data is stored with Cloudflare under EU jurisdiction.

## Troubleshooting

- **The report button covers another button (chat, callback, cookie settings):** in the plugin settings, right below the position, raise the **distance from bottom** (“Bottom offset” in some plugins), e.g. to 90 – the button then sits above the other one. Or change the **side distance**, or move it to the left. Empty = 16 px.
- **No button visible:** clear caches (**Configuration → Development → Performance → Clear all caches** or `drush cr`), and upstream caches like Varnish or a CDN if needed. Check that the key starts with `bk_live_` and what **Show the report button to** is set to. The button never appears on admin pages.
- **Button only visible to some users:** **Show the report button to** is set to **Logged-in users only** or to the permission.
- **Test error doesn't arrive:** check the server key (starts with `bk_server_`). The server must be allowed to make outgoing HTTPS connections to `bugd.one`.
- **HTTP 403 `origin_not_allowed`:** add your domain in bugd.one under **Project → Settings → Allowed domains**.
- **HTTP 403 `project_read_only`:** the trial has ended; choose a plan.
- **Content Security Policy:** with the Content Security Policy module (`csp`), bugd.one 1.3 and later adds its domain to `script-src`, `connect-src`, `img-src` and `media-src` itself (only in directives your policy restricts). If your web server or Security Kit sets the policy, allow `https://bugd.one` in `script-src` and `connect-src`. No `'unsafe-inline'` is needed: the only inline script is a small buffer for errors during page load. With the Content Security Policy (`csp`) or Security Kit (`seckit`) module, bugd.one leaves it out automatically; only errors that happen while the page is still loading are missed then. Watch the browser console for CSP messages.

## Going further

- [Drupal in the documentation](https://bugd.one/docs#drupal)
- [JavaScript error tracking in the browser](https://bugd.one/guides/javascript-error-tracking?lang=en): crash reporter options
- [TYPO3 error tracking](https://bugd.one/guides/typo3-error-tracking?lang=en) and [WordPress bug reports and error tracking](https://bugd.one/guides/wordpress-bug-reports?lang=en)

## Frequently asked questions

**Do I need the server key?**
Only for PHP errors and entries from the Drupal log. The report button and JavaScript errors run with the public project key (`bk_live_…`). The server key is secret and never appears in the page source.

**Does the server key end up in my configuration export?**
No. The module stores it in Drupal's state, not in `bugdone.settings`. So it doesn't appear in `drush config:export` or in your Git repository. Alternatively set it in `settings.php` via `$settings['bugdone_server_key']`, e.g. from an environment variable.

**Does the module work with a strict Content Security Policy?**
Yes. With the Content Security Policy module (`csp`), bugd.one allows its domain automatically from version 1.3. If your web server sets the policy, allow `https://bugd.one` in `script-src` and `connect-src`; no `'unsafe-inline'` is required. With the Content Security Policy or Security Kit module, bugd.one automatically leaves out its only small inline script (a buffer for errors during page load).

**Are 404 and 403 pages reported?**
No. “Page not found”, “access denied” and other client errors are never sent. Reported are exceptions, PHP errors, log entries of level “error” and above, and fatal errors.

**Is data from my user accounts transmitted?**
No. No user ID, no name, no e-mail address, no cookies, no form input and no IP addresses. User IDs in paths like `/user/123` are replaced.

## Related guides

- [TYPO3 error tracking: bug reports and PHP errors with bugd.one](https://bugd.one/guides/typo3-error-tracking?lang=en) — The bugd.one extension for TYPO3 11.5 to 14: report button, JavaScript errors and PHP errors from frontend, backend and scheduler – step by step.
- [Bug reports and error tracking for WordPress with bugd.one](https://bugd.one/guides/wordpress-bug-reports?lang=en) — The bugd.one plugin for WordPress: a bug report button, PHP and JavaScript errors, failed requests and an overview on your dashboard — setup and privacy.
- [JavaScript error tracking in the browser](https://bugd.one/guides/javascript-error-tracking?lang=en) — Capture uncaught errors and unhandled promise rejections in the browser: crash reporter via script tag (ESM/UMD), releases and source-map upload with curl.

## Up and running in two minutes

Create an account, add a project, paste your key — all Pro features free for 7 days, no credit card required.

[Try free for 7 days](https://bugd.one/login) · [Read the docs](https://bugd.one/docs) · [All guides](https://bugd.one/guides?lang=en)

---

bugd.one — https://bugd.one/guides/drupal-error-tracking?lang=en · Overview for AI agents: [llms.txt](https://bugd.one/llms.txt) · API: [openapi.json](https://bugd.one/openapi.json)
