fix(settings): repair admin panel on Nextcloud 35 - #150
Open
rikled wants to merge 2 commits into
Open
Conversation
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com> Assisted-by: Claude Code:Opus 4.8
DmySyz
approved these changes
Aug 26, 2026
Member
|
`src/settings.js:596-604` mounts FontManager behind `requestAnimationFrame` + a DOM-persisted `dataset.euroofficeMounted` flag, but the four `ListPicker` mounts (`:74`, `mountedPickers`) use a plain in-memory `Set` that resets on every script execution. What symptom prompted the FontManager guard — a script re-run, or just defensive timing around `SettingsContentWrapper.vue`'s move? If the settings bundle can genuinely execute twice, the `ListPicker` mounts are exposed to the same double-mount risk and the fix is incomplete; if it can't, the rAF + dataset guard is dead weight. Worth clarifying either way. |
Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com> Assisted-by: Claude Code:Opus 4.8
Member
Author
|
Thanks, was indeed unnecessary. Please check again :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clicking any option in the admin panel (a format checkbox, "Enable live-viewing mode", "Enable watermarking", "Enable plugins"..) blanks the settings page on (at least) NC 35. Fixing that surfaced a second, older bug: watermark settings never persisted.
fix(settings): repair admin panel on Nextcloud 35
The template still uses the deprecated class="checkbox" / class="radio" markup, where core CSS moves the real input off-canvas (inset-inline-start: -10000px) and paints a fake control via label::before. NC 35 no longer renders app settings in place: SettingsContentWrapper.vue replaceChildren()-moves the markup into a Vue-managed container inside NcAppContent, which the off-canvas inputs do not survive. Format checkboxes have no app JS bound at all, confirming the markup is the trigger.
fix(settings): accept JSON booleans when saving watermark settings
setWatermarkSettings() compared enabled against the string "true", so every save stored watermark_enabled = "no" and returned early, discarding text, flags and lists. Regressed in 51e2d6a, which switched the admin panel from form-encoded $.ajax to JSON via axios; getFormats() was adapted at the time, the watermark path was not. Added AppConfig::isTrue() and routed all three call sites through it.
Follow-up: the checkbox CSS is still a stopgap: it wins on specificity against legacy core styles slated for removal. Those controls should move to NcCheckboxRadioSwitch / NcSettingsSection next.
Assisted-by: Claude Code:Opus 5