Skip to content

[BUG] Script setting changes are not applied and Reload scripting engine does not reload #3861

Done

Description

@pbek

Expected behaviour

Saving changed script settings should apply them to the running script without restarting QOwnNotes. Clicking Reload scripting engine should reload the engine even when no script was enabled or disabled, so edits to settings or to a local QML file take effect.

Actual behaviour

QOwnNotes saves the new setting, but the running script keeps the previous value. With a fetchUrlTitleHook script that uses glab for configured GitLab servers, a newly added server was ignored and the link dialog fell back to fetching the web page, yielding Sign in · GitLab. The same authenticated glab lookup succeeded from the terminal, and restarting QOwnNotes made the hook return the project name.

Steps to reproduce

  1. Install and enable a script with a configurable setting. For the observed case, use a fetchUrlTitleHook that handles GitLab project URLs only on hosts listed in a script setting.
  2. In Settings → Scripting, change the value (for example, add a GitLab server). Leave all scripts’ enabled states unchanged and click OK.
  3. Invoke the script again (for example, paste a private project URL from the newly added host into a fresh link dialog). The script still uses the old setting.
  4. Restart QOwnNotes and repeat the action. The script now uses the saved setting.

Environment and likely cause

  • QOwnNotes 26.11.14 on NixOS 26.11
  • glab 1.130.0 in the original reproduction; the problem is in QOwnNotes’ script settings lifecycle, not GitLab authentication.

In ScriptingSettingsWidget::storeScriptListEnabledState(), the reload is conditional on an enabled-state change. The explicit reload button handler calls the same conditional function without forcing a reload. This looks related to the settings performance change in issue #3606. Tracking changed script settings separately and forcing a reload on an explicit button click would preserve the optimization for unchanged settings.

Activity

  1. added 2 commits that reference this issue on Nov 24, 2026
  2. pbek commented on Nov 24, 2026

    @pbek
    OwnerAuthor

    Fixed for QOwnNotes 26.11.15. Clicking OK in Settings → Scripting now applies changed script settings to running scripts without restarting QOwnNotes. Both Reload scripting engine buttons now pick up local QML edits even when no scripts were enabled or disabled. Saving unchanged settings still skips the reload.

    The local Qt 6 test suite passed, including a regression test that checks all three behaviors with a local fetchUrlTitleHook script.

  3. added 2 commits that reference this issue on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions