From ae64a6acbc119f78394e65cee7bf49910e1c7013 Mon Sep 17 00:00:00 2001 From: Paul Nothaft Date: Mon, 11 May 2026 19:32:56 +0200 Subject: [PATCH] fix(branding): socials + promo round-trip from DB to form (#460) formatBrandingSettings was updated when the BrandingSettings interface added the footer-overhaul fields (#441 / #440), so the admin BrandingPage initialised them as empty strings on every load. Saving any other field then sent the form's empty socials / promo_markdown / promo_position back to the backend and wiped the saved values from the DB. The public gallery footer kept rendering the old values until the next save, which is why the bug appeared asymmetric (visible to galleries, gone from the admin form). Add the missing read mappings for the seven branding_* keys so the form round-trips them correctly. Reported by @Rekoo-PS in #460 (split out of #447). --- frontend/src/services/settings.service.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/services/settings.service.ts b/frontend/src/services/settings.service.ts index 40276c24..857ef961 100644 --- a/frontend/src/services/settings.service.ts +++ b/frontend/src/services/settings.service.ts @@ -323,7 +323,20 @@ export const settingsService = { login_logo_frame_enabled: this._parseBoolean(rawSettings.branding_login_logo_frame_enabled, true), login_logo_size: ['small', 'medium', 'large', 'xlarge'].includes(rawSettings.branding_login_logo_size) ? rawSettings.branding_login_logo_size - : 'medium' + : 'medium', + // Footer overhaul (#441 + #440 / #460). These were added to the + // BrandingSettings interface but not to the read mapper, so the + // BrandingPage form initialised them as empty strings on every + // load. The next save then sent the empty form back to the + // backend and wiped the saved values from the DB — even though + // the gallery footer kept rendering them until the next save. + facebook_url: rawSettings.branding_facebook_url || '', + instagram_url: rawSettings.branding_instagram_url || '', + whatsapp_url: rawSettings.branding_whatsapp_url || '', + twitter_url: rawSettings.branding_twitter_url || '', + youtube_url: rawSettings.branding_youtube_url || '', + promo_markdown: rawSettings.branding_promo_markdown || '', + promo_position: rawSettings.branding_promo_position === 'below_footer' ? 'below_footer' : 'above_footer' }; },