Skip to content

Fix: clearing multi-select favorites doesn't persist - #210

Merged
skerbis merged 1 commit into
FriendsOfREDAXO:mainfrom
skerbis:fix/clear-multiselect-favorites
Sep 17, 2026
Merged

skerbis merged 1 commit into
FriendsOfREDAXO:mainfrom
skerbis:fix/clear-multiselect-favorites

Conversation

@skerbis

@skerbis skerbis commented Sep 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Deselecting every option in the "AddOn Pages Favorites" or category favorites multi-select and saving didn't actually clear the setting — the old selection kept coming back.
  • Cause: an empty <select multiple> isn't submitted at all by browsers, so quick_navigation_favs<id>/quick_navigation_addon_favs<id> were simply absent from the POST payload, and $package->setConfig($config) never touched (let alone cleared) those keys.
  • Fix mirrors the existing normalization already in place for quick_navigation_disabled_buttons<id>: default both to an empty array when missing from the submitted config before saving.

Test plan

  • Selected entries in both "AddOn Pages Favorites" and category favorites, saved, reloaded — selection persisted correctly
  • Cleared all selections in both fields, saved, did a full page reload — both fields are now empty (no stale selection reappearing)

🤖 Generated with Claude Code

Browsers don't submit a multi-select field at all when every option
is deselected, so the previously saved value for
quick_navigation_favs<id> and quick_navigation_addon_favs<id> was
never overwritten with an empty selection — the old favorites kept
reappearing after save. Normalize both to an empty array when
missing from the POST payload, matching the existing handling for
quick_navigation_disabled_buttons<id>.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@skerbis
skerbis merged commit 5515ab1 into FriendsOfREDAXO:main Sep 17, 2026
1 check failed
skerbis added a commit to skerbis/quick_navigation that referenced this pull request Sep 17, 2026
Resolves conflicts in package.yml/CHANGELOG.md from FriendsOfREDAXO#209/FriendsOfREDAXO#210/FriendsOfREDAXO#212
having merged first: bumps the version to 9.2.1 (patch on top of
the now-released 9.2.0) and keeps both changelog entries.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant