Skip to content

fix(settings): repair admin panel on Nextcloud 35 - #150

Open
rikled wants to merge 2 commits into
mainfrom
fix/adminpanelnc35
Open

fix(settings): repair admin panel on Nextcloud 35#150
rikled wants to merge 2 commits into
mainfrom
fix/adminpanelnc35

Conversation

@rikled

@rikled rikled commented Aug 25, 2026

Copy link
Copy Markdown
Member

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.

  1. 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.

    • render real, in-flow checkboxes/radios scoped to .section-eurooffice
    • stop the generic input { width: 250px } rule applying to checkboxes
    • guard the unprotected sameTab handler, which aborted the rest of init
    • replace the select2 group/tag pickers with NcSettingsSelectGroup / NcSelectTags via a new ListPicker.vue, keeping the hidden inputs as the wire format (fixes Can't set the Grouprights #135, bug: Could not find resource core/js/dist/systemtags.js to load #140)
    • drop the resulting jQuery, underscore, OC.SystemTags and core/dist/systemtags dependencies
  2. 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

Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
Assisted-by: Claude Code:Opus 4.8
@rikled
rikled requested a review from moodyjmz August 25, 2026 22:38
@moodyjmz

Copy link
Copy Markdown
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
@rikled

rikled commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Thanks, was indeed unnecessary. Please check again :)

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.

Can't set the Grouprights

3 participants