Verwendung des sicheren Modus zur Fehlerbehebung bei Themes und Plugins

:bookmark: This guide explains how to use Discourse’s Safe Mode to troubleshoot issues with themes and plugins.

:person_raising_hand: Required user level: All users

Discourse offers a “JavaScript Safe Mode” that allows any user to isolate the root cause of JavaScript issues caused by plugins, themes, or theme components. This feature is particularly useful for troubleshooting problems on your Discourse site.

Accessing Safe Mode

To access Safe Mode, follow these steps:

  1. Open a new browser tab.

  2. Enter the following URL in the address bar, replacing [your-site-name](http://discourse.example.com) with your actual Discourse site domain:

    http://discourse.example.com/safe-mode
    

    For example, the Safe Mode URL for the Discourse demo site is:
    https://try.discourse.org/safe-mode

  3. Click the ‘Enter Safe Mode’ button:

Safe Mode options

When entering Safe Mode, you can select from the following options:

  • Disable all themes and theme components
  • Disable unofficial plugins
  • Disable all plugins

By default, all three options are selected. However, you can enter Safe Mode multiple times with different combinations to isolate the specific component causing issues on your site.

Using Safe Mode

  1. Select the desired options on the Safe Mode page.
  2. Click “Enter Safe Mode” to apply your selections.
  3. You will see a banner indicating that Safe Mode is enabled.
  4. Browse your site to check if the issue persists with the selected components disabled.

Exiting Safe Mode

To exit Safe Mode, simply close your browser tab.

Important notes

When sharing a Safe Mode link for your site, be aware that it needs to be opened in a new tab or added directly to the address bar; otherwise, it may not work correctly.

:warning: Safe Mode currently only disables the JavaScript portions of plugins. To disable the server-side portion of a plugin, you must rebuild your container with the plugin commented out.

Troubleshooting

If you cannot load the initial Safe Mode selection page, try visiting the following URL, which will skip the page and load Safe Mode directly:

https://discourse.example.com/?safe_mode=no_themes,no_plugins

For example: https://try.discourse.org/?safe_mode=no_themes,no_plugins

:information_source: On Discourse versions 2.9.0.beta8 and below, you need to use ?safe_mode=no_custom,no_plugins instead.

Last edited by @hugh 2024-07-30T05:32:08Z

Check documentPerform check on document:
73 „Gefällt mir“

Irgendwie funktionieren diese Links bei mir nur, wenn ich sie in einem neuen Tab oder Fenster öffne. Der erste Link führt zur Oops-Seite und der zweite zur Homepage. Aber das Safe-Mode-Banner erscheint nicht. Der zweite Link kann zu Problemen führen, wenn man einen Link an einen Benutzer sendet, damit dieser den Safe-Mode ausprobieren kann. Wenn er einfach auf den Link klickt, wird er die Seite immer noch ohne Safe-Mode nutzen.

Vielleicht sollten diese Informationen zu den how-to hinzugefügt werden.

4 „Gefällt mir“

Gut bemerkt – beide Links sind kaputt. Der erste braucht ein ? und der zweite ein Komma statt %2C

2 „Gefällt mir“

Wo braucht es ein “?”?
Könnten Sie den Link als Beispiel teilen?

1 „Gefällt mir“

Oh, Entschuldigung, es sieht so aus, als hätte ich mich beim ersten Mal geirrt: Die interne Navigation schlägt fehl, aber für ein neues Fenster funktioniert sie.
Discourse Meta

Und ich habe mich auch beim anderen geirrt! Discourse Meta - The Official Support Forum for Discourse
funktioniert nicht als Navigation auf derselben Seite.

Mein Fehler: Etwas ist kaputt, aber es sind nicht die URLs.

1 „Gefällt mir“

Ich glaube, das liegt daran, dass versucht wird, sie an Ort und Stelle zu öffnen. Anstatt mich damit zu streiten, habe ich sie durch try.discourse.org ersetzt. :slight_smile:

2 „Gefällt mir“

Ich denke, Administratoren sollten trotzdem darüber informiert werden, dass das Teilen dieser Links leicht zu Problemen führen kann.

Zum Beispiel melde ich ein Problem auf Meta. Sie könnten fragen: „Könnten Sie https://meta.discourse.org/safe-mode ausprobieren?“ Dann würde ich Ihnen sagen, dass der Link nicht funktioniert.
Oder noch schlimmer: Sie möchten angeben, dass ich nur Themes deaktivieren soll, also bitten Sie mich, https://meta.discourse.org/?safe_mode=no_themes auszuprobieren. Mein Problem besteht weiterhin. Woher wissen Sie, dass ich wirklich den abgesicherten Modus verwendet habe? Als Benutzer denke ich, dass es funktioniert hat, weil etwas passiert ist, als ich auf den Link geklickt habe.

Nachdem ich hier gepostet habe, wissen Sie davon. Aber woher wissen andere Administratoren, dass sie darauf achten müssen, dass dies ein Problem sein könnte?

3 „Gefällt mir“

Ich frage mich, ob aufgrund der Art dieser sicheren Startseite, die den gesamten Inhalt ersetzt, eine Ausnahme gemacht werden sollte, um diesen Link in einem neuen Tab zu öffnen.

2 „Gefällt mir“

Ich habe eine Notiz und auch einen Screenshot von einem ‘erfolgreichen’ hinzugefügt. Wie sieht das aus?

4 „Gefällt mir“

3 Beiträge wurden in ein neues Thema aufgeteilt: Soll der abgesicherte Modus für Nicht-Mitarbeiter standardmäßig deaktiviert sein?