Skip to content

CMS home-page picker: list only ACTIVATED themes - #325

Open
WebTigers wants to merge 1 commit into
mainfrom
fix/home-picker-active-themes
Open

WebTigers wants to merge 1 commit into
mainfrom
fix/home-picker-active-themes

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

What

Cms_Service_Paths (the /api source for the home-page selector's combobox) now lists a theme's pages
only when that theme is activated. A theme shipped as a module (modules/theme-<key>) must have its
module active; a plain themes/<name> theme has no module to deactivate, so it stays available.

Why

It enumerated Tiger_Theme::inventory() — every installed theme, active or not (the method's own
docblock says so) — so the picker offered pages from deactivated theme modules. That let / be
pointed at a theme that isn't even on, which is how a stale @theme:grey-mist home got set on a site
whose active theme is something else. You can't serve a page from a theme that's turned off.

Scope

Selector data only. Reuses the Tiger_Code_Modules inactive-slugs pattern
(array_flip((new Tiger_Model_Module())->inactiveSlugs())). The stored home_page value, its label
resolution (labelFor), and themeContentAction are untouched.

Verified on dev

Inactive theme modules on tiger-dev: theme-porto, theme-crafto-interior, theme-tigermarketing.
Before: the picker listed all of them. After: the advanced picker's theme group lists only
@theme:grey-mist (the one activated theme module); the three inactive ones are gone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ

Cms_Service_Paths enumerated Tiger_Theme::inventory() — every INSTALLED theme, active or not — so the
home-page selector offered pages from deactivated theme modules, letting / be pointed at a theme that
isn't on (how a stale @theme:grey-mist home got set). The picker now skips a theme whose module
(theme-<key>) is in Tiger_Model_Module::inactiveSlugs(); plain themes/<name> themes (no module to
deactivate) stay available. Reuses the Tiger_Code_Modules inactive-slugs pattern. Selector-only — the
stored value, its label resolution, and themeContentAction are untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
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