Skip to content

A quick second change in Extended Options saves the wrong value #552

Closed

Description

@nickhamze

If an administrator changes an Extended Option twice quickly, OpenStation can show the final choice while WordPress saves the first one. Everything looks fine until the page reloads and the setting jumps back.

How to reproduce

  1. Open Preferences → Features as an administrator.
  2. Change Enable drag-and-drop in the Media Library.
  3. Change it back before the first save finishes.
  4. The checkbox ends where you left it.
  5. Reload OpenStation. The first value returns because the second change was never saved.

I reproduced this by briefly delaying the first Extended Options request. The UI ended enabled, while the only request sent to WordPress contained media_library_enhanced: false.

What should happen

The last choice should win. If OpenStation cannot accept another change while saving, the control should be temporarily disabled instead of pretending the second click was saved.

What is happening

The control changes immediately, but the save function exits when another request is already running. Nothing queues the newer value for a follow-up save.

Where to look

  • src/settings/sections/extended.ts
  • includes/extended-options.php

A good fix would either queue one trailing save with the latest state or lock the control until the current save settles. This still reproduces on current origin/trunk at c670170.

Activity

  1. changed the title [-]Extended option toggles can save the opposite of the final visible state[/-] [+]A quick second change in Extended Options saves the wrong value[/+] on Aug 11, 2026
  2. nickhamze commented on Aug 11, 2026

    @nickhamze
    CollaboratorAuthor

    Screenshots

    The checkbox shows the administrator's final choice, but the server still has the earlier one:

    Extended Option UI and saved value disagree

    After reload, the server's earlier value returns to the UI:

    Earlier Extended Option value returns after reload

  3. nickhamze commented on Aug 12, 2026

    @nickhamze
    CollaboratorAuthor

    The full 137-setting clarity pass reproduced this again with Games: the switch ended On, but WordPress had saved Off and the app disappeared after reload. The existing report and screenshot confirm the same lost-final-change path applies beyond Media Library. PR #581 improves the site-wide wording, but does not claim to fix this save race.\n\nGames appears on while the saved value is off

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions