From 175e00218f7dddf94a7a0265cfe0b7c54692e9aa Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 28 Oct 2026 12:25:16 +0100 Subject: [PATCH] fix(web-app-joomla): load the TinyMCE content CSS from the page's own origin On the onion pick (CI run 40625679270, Joomla#0) the article editor rendered transparent in light mode and TinyMCE's own dark default in dark mode: content_css_custom held four absolute clearnet URLs (JOOMLA_URL and the clearnet CDN host), written into the plugin row once, and the onion browser never requested any of them (openresty log: 1508 editor pages on the onion host, no request for editor.min.css, editor.css or the unversioned layer/default sheets). Joomla 6.2.0's TinyMCE plugin passes content_css_custom through only when it contains "http"; anything else is resolved as ONE file name in the active site template's css folder and returned host-relative (DisplayTrait.php:212, ResolveFiles::includeRelativeFiles). So the editor sheet now lives at media/templates/site/cassiopeia/css/infinito-editor.css, content_css_custom is its basename, and the sheet @imports Cassiopeia's editor.min.css plus the CDN's layer.css and default.css through the same-origin /_infinito/cdn/ route, in the previous cascade order. JOOMLA_URL lost its last consumer and is dropped. Co-Authored-By: Claude Opus 5.5 --- roles/web-app-joomla/templates/design/editor.css.j2 | 3 +++ roles/web-app-joomla/vars/main.yml | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/roles/web-app-joomla/templates/design/editor.css.j2 b/roles/web-app-joomla/templates/design/editor.css.j2 index 8933d4d681..8532eda1d7 100644 --- a/roles/web-app-joomla/templates/design/editor.css.j2 +++ b/roles/web-app-joomla/templates/design/editor.css.j2 @@ -1,3 +1,6 @@ +@import url("editor.min.css"); +@import url("{{ lookup('cdn', 'web-svc-cdn').relative_urls.shared.css }}/layer.css"); +@import url("{{ lookup('cdn', 'web-svc-cdn').relative_urls.shared.css }}/default.css"); :root code[class*=language-], :root pre[class*=language-] { color: var(--design-text); diff --git a/roles/web-app-joomla/vars/main.yml b/roles/web-app-joomla/vars/main.yml index 3f5609d4d6..fd24e7d44d 100644 --- a/roles/web-app-joomla/vars/main.yml +++ b/roles/web-app-joomla/vars/main.yml @@ -7,7 +7,6 @@ JOOMLA_IMAGE: "{{ lookup('config', application_id, 'services.joomla.image') }}" JOOMLA_CONTAINER: "{{ lookup('config', application_id, 'services.joomla.name') }}" JOOMLA_CONTAINER_ADDRESS: "{{ lookup('container_address', application_id, entity_name) }}" JOOMLA_DOMAINS: "{{ lookup('domains', application_id) }}" -JOOMLA_URL: "{{ lookup('tls', application_id, 'url.base') | regex_replace('/+$', '') }}" JOOMLA_SITE_NAME: "{{ lookup('design', application_id).label }}" JOOMLA_DB_CONNECTOR: "{{ 'pgsql' if lookup('database', application_id, 'type') == 'postgres' else 'mysqli' }}" JOOMLA_CONFIG_FILE: "/var/www/html/configuration.php" @@ -55,18 +54,13 @@ JOOMLA_DESIGN_STYLESHEETS: src: "design/colors.css.j2" - dest: "{{ JOOMLA_DESIGN_EDITOR_SHEET }}" src: "design/editor.css.j2" -JOOMLA_DESIGN_EDITOR_SHEET: "media/infinito-design/editor.css" -JOOMLA_DESIGN_EDITOR_CONTENT_CSS: - - "{{ [JOOMLA_URL, 'media/templates/site/cassiopeia/css/editor.min.css'] | url_join }}" - - "{{ [lookup('cdn', 'web-svc-cdn').urls.shared.css, 'layer.css'] | url_join }}" - - "{{ [lookup('cdn', 'web-svc-cdn').urls.shared.css, 'default.css'] | url_join }}" - - "{{ [JOOMLA_URL, JOOMLA_DESIGN_EDITOR_SHEET] | url_join }}" +JOOMLA_DESIGN_EDITOR_SHEET: "media/templates/site/cassiopeia/css/infinito-editor.css" JOOMLA_DESIGN_TINYMCE: skin: "oxide" skin_dark: "oxide" skin_admin: "oxide" skin_admin_dark: "oxide" - content_css_custom: "{{ JOOMLA_DESIGN_EDITOR_CONTENT_CSS | join(',') }}" + content_css_custom: "{{ JOOMLA_DESIGN_EDITOR_SHEET | basename }}" JOOMLA_DESIGN_IMAGES: - dest: "{{ JOOMLA_DESIGN_MEDIA }}/site-brand.svg" src: "site-brand.svg"