diff --git a/TECHNICAL.md b/TECHNICAL.md index c841df029..688fcad40 100644 --- a/TECHNICAL.md +++ b/TECHNICAL.md @@ -1,3 +1,63 @@ +### Support Email Diagnostic Info + +The "Support E-Mail" link on the CommonsBooking admin dashboard (`CommonsBooking → Dashboard`) pre-fills an email to `mail@commonsbooking.org` with a diagnostic snapshot of the installation. This reduces back-and-forth by ensuring support requests arrive with the context needed to reproduce issues. + +**Code location:** `templates/dashboard-index.php` + +The body is built as a plain PHP string and passed through `rawurlencode()` before being placed in the `mailto:` href. The link is output via `esc_attr()`. + +#### Fields included + +| Field | Source | Notes | +|---|---|---| +| Installations-URL | `home_url()` | Always | +| WP-Version | `get_bloginfo('version')` | Always | +| PHP-Version | `phpversion()` | Always | +| CB-Version | `COMMONSBOOKING_VERSION` | Always | +| Theme | `wp_get_theme()->get('Name'/'Version')` | Always | +| Locale | `get_locale()` | Always | +| WP_DEBUG | `defined('WP_DEBUG') && WP_DEBUG` | Always | +| PHP-Memory-Limit | `ini_get('memory_limit')` | Always | +| Permalink-Structure | `get_option('permalink_structure')` | Always | +| Multisite | `is_multisite()` | Only when true | +| WP-Cron | `DISABLE_WP_CRON` constant | Only when disabled | +| External-Object-Cache | `wp_using_ext_object_cache()` | Only when active | +| Active known-problematic plugins/themes | `is_plugin_active()` + `wp_get_theme()` | Only when any are active | +| Max-Upload-Size | `wp_max_upload_size()` | Always | +| CB Settings | `get_option('commonsbooking_options_*')` | Always (booking comments, iCal, API, cache adapter, bookings page) | +| Active plugins | `get_plugins()` + `get_option('active_plugins')` | Always | + +#### Adding a new field + +Append a line to `$support_body` inside the PHP block before `$support_href` is built: + +```php +$support_body .= 'My-Field: ' . my_wp_function() . "\r\n"; +``` + +For conditional fields (only shown when non-default), wrap in an `if`: + +```php +if ( some_condition() ) { + $support_body .= 'My-Flag: active' . "\r\n"; +} +``` + +#### Maintaining the known-problematic plugin list + +The `$known_problematic_plugins` array maps plugin file paths (as registered in WordPress) to human-readable names. The list is sourced from the [FAQ](docs/en/documentation/faq/problems-and-answers.md). When a new incompatibility is documented in the FAQ, add it here too: + +```php +$known_problematic_plugins = [ + // ... + 'new-plugin/new-plugin.php' => 'New Plugin Display Name', +]; +``` + +The plugin file path is always `folder-name/main-file.php` — the same string stored in the `active_plugins` option. + +--- + ### Formatter We adhere to [PHPCS](https://github.com/PHPCSStandards/PHP_CodeSniffer) rules defined in the [phpcs.xml](https://github.com/wielebenwir/commonsbooking/blob/master/.phpcs.xml.dist) rules file, as it is a mature tool and well established in the Wordpress-Plugin development scene. diff --git a/docs/de/documentation/faq/problems-and-answers.md b/docs/de/documentation/faq/problems-and-answers.md index aebab7705..3a16ba70f 100644 --- a/docs/de/documentation/faq/problems-and-answers.md +++ b/docs/de/documentation/faq/problems-and-answers.md @@ -1,4 +1,26 @@ -# Probleme und Antworten +# Probleme und Antworten + +## Was sendet der „Support E-Mail"-Link? + +Der Link **Support E-Mail** im CommonsBooking-Dashboard (`CommonsBooking → Dashboard`) öffnet dein E-Mail-Programm mit einer vorausgefüllten Nachricht, die eine Diagnosezusammenfassung deiner Installation enthält. So kann das Support-Team dein Problem nachvollziehen und lösen, ohne zunächst Rückfragen stellen zu müssen. + +Folgende Informationen werden automatisch eingefügt: + +- **Website-URL** — die Adresse deiner WordPress-Installation +- **WordPress-Version**, **PHP-Version**, **CommonsBooking-Version** +- **Aktives Theme** (Name und Version) +- **Locale** (Spracheinstellung) +- **WP_DEBUG**-Status (aktiviert/deaktiviert) +- **PHP-Speicherlimit** +- **Permalink-Struktur** +- **CB-Einstellungen** — ob Buchungskommentare, der iCal-Feed und die API aktiviert sind, der verwendete Cache-Adapter sowie die konfigurierte Buchungsseite +- **Maximale Upload-Größe** +- **Alle aktiven Plugins** mit ihren Versionen +- Alle derzeit aktiven **bekannten inkompatiblen Plugins oder Themes** (siehe Abschnitte weiter unten) + +Falls deine Installation ein **WordPress-Multisite**-Netzwerk ist, **WP Cron deaktiviert** hat oder einen **externen Objekt-Cache** (z. B. Redis oder Memcached) verwendet, wird dies ebenfalls vermerkt — jedoch nur, wenn es zutrifft, damit die E-Mail übersichtlich bleibt. + +Passwörter, Nutzerdaten oder Buchungsinhalte werden nicht übermittelt. Du kannst die vorausgefüllte Nachricht vor dem Senden einsehen und bearbeiten. ### Anzeige Kalender-Widget im Admin-Bereich diff --git a/docs/en/documentation/faq/problems-and-answers.md b/docs/en/documentation/faq/problems-and-answers.md index 3a8582ec6..e43421fee 100644 --- a/docs/en/documentation/faq/problems-and-answers.md +++ b/docs/en/documentation/faq/problems-and-answers.md @@ -1,5 +1,27 @@ # Problems and answers +## What does the Support E-Mail link send? + +The **Support E-Mail** link on the CommonsBooking dashboard (`CommonsBooking → Dashboard`) opens your email client with a pre-filled message body containing a diagnostic snapshot of your installation. This helps the support team reproduce and diagnose your issue without needing to ask follow-up questions. + +The following information is included automatically: + +- **Site URL** — the address of your WordPress installation +- **WordPress version**, **PHP version**, **CommonsBooking version** +- **Active theme** name and version +- **Locale** (language setting) +- **WP_DEBUG** status (enabled/disabled) +- **PHP memory limit** +- **Permalink structure** +- **CB settings** — whether booking comments, the iCal feed, and the API are enabled, the cache adapter in use, and the configured bookings page +- **Max upload size** +- **All active plugins** with their versions +- Any **known-incompatible plugins or themes** that are currently active (see sections below) + +If your installation is a **WordPress Multisite**, has **WP Cron disabled**, or uses an **external object cache** (e.g. Redis or Memcached), those facts are noted as well — but only when they apply, to keep the email tidy otherwise. + +No passwords, user data, or booking content is included. You can review and edit the pre-filled message before sending it. + ### Calendar widget display in the admin area If there are problems displaying the calendar in the booking admin area (the admin backend), see the image below on the right, one possible solution is to disable or remove and reinstall the ["Lightstart" (wp-maintenance-mode) plugin](https://wordpress.org/plugins/wp-maintenance-mode). diff --git a/templates/dashboard-index.php b/templates/dashboard-index.php index 9750e7b55..5ba17b6db 100644 --- a/templates/dashboard-index.php +++ b/templates/dashboard-index.php @@ -17,7 +17,87 @@