# D10_ADMIN_THEME_MIGRATION.md

**Phase 3.1 — D7 administration UI audit · Seven → Claro**
Project: CE Online Training Courses — Drupal 7.105 → Drupal 10.6.15
Produced: 2026-08-24 · **Status: AUDIT ONLY. No theme installed, enabled, configured or created.**

**Governing rule**

> The admin **theme** must change — Seven does not exist in Drupal 10.
> **Administrative functionality and workflows must not change.**
> Treat the administration UI separately from the public frontend (D10_FRONTEND_MIGRATION.md).

Tags: **[P]** preserve · **[TR]** technical rewrite, same workflow · **[F]** retired, no D10 successor

All findings below are measured from the live D7 database and codebase — `system`, `variable`, `block`,
`role`, `role_permission`, `views_view`, `views_display`, and the module/theme sources.

---

## 1. Measured configuration

| Setting | Value | Meaning |
|---|---|---|
| `theme_default` | `cetc_new` | Front end (separate document) |
| `admin_theme` | **`seven`** | Administration |
| `node_admin_theme` | **`1`** | ⚠️ **All node add/edit forms use the admin theme** — the widest-reaching setting |
| `theme_seven_settings` | **absent** | ✅ **Seven has never been configured** |
| Enabled themes | `cetc`, `cetc_new`, `bartik`, `seven` | |
| Core `toolbar` | **status = 0** | ⚠️ **Core toolbar is DISABLED** |
| Core `overlay` | **status = 0** | ⚠️ Admin overlay disabled — admin pages open as full pages |
| `admin_menu` | status = 1 | The actual admin navigation |
| `admin_menu_toolbar` | status = 1 | Its toolbar-style rendering |
| `admin_devel` | status = 1 | Developer submenu |
| `shortcut`, `dashboard`, `field_ui`, `views_ui` | status = 1 | Core admin modules |
| `admin_menu*` variables | **none present** | ✅ admin_menu is at default settings |

---

## 2. Seven itself — what would be lost

### 2.1 Templates — 2

`themes/seven/page.tpl.php` · `themes/seven/maintenance-page.tpl.php`
**Neither is overridden anywhere.** The only `page.tpl.php` / `maintenance-page.tpl.php` overrides in
`sites/` belong to `bootstrap`, `cetc_new` and `cetc` — all **front-end** themes.

### 2.2 CSS — 9 files, all stock

`style.css` · `style-rtl.css` · `reset.css` · `vertical-tabs.css` · `vertical-tabs-rtl.css` ·
`jquery.ui.theme.css` · `ie.css` · `ie6.css` · `ie7.css`

`ie6.css` / `ie7.css` are dead weight in any modern browser. Claro supplies equivalents for the rest,
including vertical tabs and jQuery UI theming.

### 2.3 JavaScript — **none**

✅ **Seven ships no JavaScript file.** There is no admin-theme JS behaviour to port.

### 2.4 Custom admin overrides — **none**

- No `theme_seven_settings` variable → every Seven setting is at its default.
- No Seven sub-theme, copy or override anywhere under `sites/all/themes` (contents: `bootstrap`, `cetc`,
  `cetc_new`, `README.txt`).
- The only Seven-named files in the codebase belong to **modules** styling their own admin UI:
  `views/css/views-admin.seven.css`, `views/css/views-admin.seven-rtl.css`,
  `inline_entity_form/theme/inline_entity_form.seven.css`, `rules/ui/rules.ui.seven.css`.
  `rules` is **not being installed** (decision 11); the other two ship D10-native admin styling.

> **There is no custom admin design to preserve.** Migration risk is confined to *workflow*, not appearance.

---

## 3. Custom module code depending on Seven markup or classes — **NONE**

Searched every custom module (`course_actions`, `ce_users`, `ce_referral`, `wistia`,
`media_wistia_ceonline`, `ce_common`, `ksc_commerce_cart_status_block`, `flag_clear`) for:

| Probe | Result |
|---|---|
| `'seven'` / `"seven"` / `seven.css` | **0 matches** |
| `vertical_tabs` / `vertical-tabs` | **0 matches** |
| `theme('table')` / `theme_table` / `tableselect` | **0 matches** |

✅ **No custom module renders against Seven's markup or classes.** The theme swap cannot break custom code
by CSS coupling.

---

## 4. Custom module administration pages — 5

| Path | Module | D7 form API | D10 equivalent | Tag |
|---|---|---|---|:--:|
| `admin/config/ce-referral` | `ce_referral` | `drupal_get_form` → **`system_settings_form()`** | `ConfigFormBase` in `ce_referral` | TR |
| `admin/config/ce-referral/admin-credit-debit_referral` | `ce_referral` | `drupal_get_form` | `FormBase` + route | TR |
| `admin/config/services/wistia_integration` | `wistia` | `drupal_get_form` → **`system_settings_form()`** | `ConfigFormBase` in `ce_wistia` | TR |
| `admin/config/services/wistia` | `media_wistia_ceonline` | `drupal_get_form` → **`system_settings_form()`** | `ConfigFormBase` in `ce_wistia` | TR |
| `admin/config/development/license-prefix-update` | `ce_users` | `drupal_get_form` | ⚠️ **The one-time licence-prefix backfill batch. Per MODULE_MAPPING §6 this is NOT ported** — its audit table migrates as data | F |
| `admin/config/content/flag-manager` | `flag_clear` | `drupal_get_form` | Small custom form or a Drush command | TR |

**All three `system_settings_form()` pages map cleanly to `ConfigFormBase`** — the D10-native equivalent,
same fields, same saved values. **[TR]**

⚠️ `admin/config/services/wistia_integration` and `admin/config/services/wistia` are **two separate Wistia
settings pages** from two different modules, both consolidating into `ce_wistia`. Confirm whether they
remain two pages or become one — **Q-A6**.

Non-admin custom routes (front-end, covered elsewhere): `add-all-to-cart/%node`,
`buy-course-checkout/%node`, `course_actions_add_to_cart_dialog`, `get-started`,
`report-history/%report_history/delete`, `ce-referral`, `user/%user/ce-referral-rewards`,
`complete`, `play`, `track`, `unflag/*`, `wistia/browser/*`.

---

## 5. Toolbar and admin menu — the largest workflow change

**D7 does not use the core toolbar.** `toolbar` is disabled and `overlay` is disabled. Administration is
navigated through **`admin_menu` + `admin_menu_toolbar`** (the drop-down administration menu), with
`admin_devel` adding a developer submenu.

| D7 | D10 | Tag | Note |
|---|---|:--:|---|
| `admin_menu` (drop-down menu) | Core **Toolbar** + contrib **`admin_toolbar`** (+ `admin_toolbar_tools`) | **TR** | ✅ **`drupal/admin_toolbar` 3.6.3 confirmed Drupal 10.6.15-compatible** (dependency probe, 2026-08-24). Currently **category E (deferred)** in composer.json — must be **restored at Phase 3.2** to reproduce D7's drop-down navigation |
| `admin_menu_toolbar` | `admin_toolbar` | TR | |
| `admin_devel` | `devel` (`require-dev`) | TR | Dev-only |
| `overlay` (disabled) | Removed from D8+ | **F** | ✅ No change — it was already off |
| `dashboard` (`/admin/dashboard`) | **No D10 successor** | **F** | See §9 A1 |
| `shortcut` | Core `shortcut` | P | |
| `field_ui`, `views_ui` | Core | P | |

> **Without `admin_toolbar`, D10's bare core toolbar is a visibly different navigation workflow** —
> administrators lose the hover drop-downs they use today. This is a workflow regression, not a styling
> one, and it is the single most important item in this document.

---

## 6. Administrative Views

### 6.1 Which views actually render in the admin theme

| Path | View | Theme |
|---|---|---|
| `admin/commerce/orders/list` | `commerce_orders` | **Seven** |
| `admin/commerce/orders/carts` | `commerce_orders` | **Seven** |
| `admin/users-without-license-number` | `users_without_license_number` | **Seven** |
| `admin/admin-coupon-used-by-user` | `admin_coupon_used_by_user` | **Seven** |
| `report1` | `Report` | `cetc_new` |
| `evaluation-results1` | `evaluation_results` | `cetc_new` |
| `accounts-export` | `accounts_export` | `cetc_new` |
| `quiz-certificate` | `quiz_certificate` | `cetc_new` |
| `user/%/orders` | `commerce_user_orders` | `cetc_new` |

> ⚠️ **The business reporting suite renders in `cetc_new`, not Seven.** Sale reports, evaluation results,
> report history, account exports and the customer order list are **front-end** pages and are golden-master
> pages under D10_FRONTEND_MIGRATION.md §7.3 / §12. **The admin theme change does not touch them.**

`admin_people` has a `default` display (no path) and a `panel_pane_admin_people` display — surfaced through
a Panels page, not a Views page. Panels is not carried to D10 (**A2**).

### 6.2 Admin-theme Views styling dependencies

`users_without_license_number` and `admin_coupon_used_by_user` use
**`views_bootstrap_table_plugin_style`** — a Bootstrap table style plugin, rendered inside **Seven**.
⚠️ `views_bootstrap` is a *front-end* Bootstrap module; under Claro these two tables will not have a
Bootstrap-based theme to style against. **Q-A7.**

---

## 7. Bulk operations

**Exactly one view uses VBO: `admin_people` (default display).** Its configured actions:

| Action | D10 |
|---|---|
| `views_bulk_operations_user_cancel_action` | VBO 4.x built-in |
| `views_bulk_operations_user_roles_action` | VBO 4.x built-in |
| `user_block_user_action` | Core action |
| `pathauto_user_update_action` | `pathauto` ^1.15 |
| `realname_action_realname_update` | `realname` ^2.0 |
| **`course_actions_masquerade_as_user_action`** | ⚠️ **CUSTOM.** Must be rebuilt as a D10 **Action plugin** in `ce_course`, per PHASE_3_IMPLEMENTATION_PLAN.md §14 |

`drupal/views_bulk_operations` ^4.4 is already in `composer.json` **require**. ✅
⚠️ VBO 4.x has a **different action API** from D7 VBO — the custom masquerade action is a **[TR]** rewrite,
and the bulk-operations UI differs in appearance while performing the same operations.

**`views_data_export` — 13 displays across 5 views** (`sale_report` ×4, `Report` ×4, `evaluation_results`
×2, `accounts_export` ×2, `admin_report_new` ×1). Already in `composer.json`. These are export workflows
administrators depend on; most render in `cetc_new`, not Seven.

---

## 8. Permissions — 5 roles, 483 grants

> ⚠️ **CORRECTED 2026-08-25 — the figures below were derived from `ceonline/db.sql`, the
> 2025-07-04 dump, and two of them were WRONG.** Re-measured against live D7:
>
> | | dump (as documented) | **live D7** |
> |---|---:|---:|
> | total grants | 483 | **485** |
> | **administrator** | 272 | **274** |
> | CE Admin | 128 | 128 ✅ |
> | Instructor | 39 | 39 ✅ |
> | authenticated | 35 | 35 ✅ |
> | anonymous | 9 | 9 ✅ |
> | roles | 5 | 5 ✅ |
>
> **The 5 roles and the CE Admin / Instructor sets are confirmed correct.** Only the
> administrator role gained 2 permissions. Evidence: `.logs/d7-roles-permissions.log`.
>
> ⚠️ **A second correction — the sensitive permissions come from `devel`, not where I said.**
> Live `role_permission.module` shows `execute php code` → **`devel`** and `switch users` →
> **`devel`** (not the `php` module, and not `masquerade`). Since `devel` is `require-dev` in
> D10, **`switch users` has no production D10 target either** — contrary to what §8 originally
> claimed. `masquerade` provides its own, differently-named permissions (6 grants live).
> All four sensitive permissions are held by **`administrator` only**.
>
> Also live: **27 blocked users** (`status = 0`) and 13,222 active. Users holding an explicit
> role: administrator 8 · CE Admin 8 · Instructor 5; **13,236 users hold no explicit role**.

| rid | Role | Grants |
|---:|---|---:|
| 1 | anonymous user | 9 |
| 2 | authenticated user | 35 |
| **3** | **administrator** | **272** |
| 4 | **CE Admin** | 128 |
| 5 | **Instructor** | 39 |

**All four flagged permissions belong to `administrator` (rid 3) only** — narrower than
MODULE_MAPPING.md §7 implied:

| Permission | Held by | D10 status |
|---|---|---|
| `execute php code` | rid 3 only | ⚠️ **No D10 target.** `drupal/php` is in `conflict`, and the `php_code` format is used by **zero** content rows (D10_FRONTEND_MIGRATION.md evidence) |
| `bypass rules access` | rid 3 only | ⚠️ **No D10 target.** Rules is not installed (decision 11) |
| `use php in custom breadcrumbs` | rid 3 only | ⚠️ **No D10 target** — same reason |
| `switch users` | rid 3 only | ✅ `masquerade` ^2.2 (already in `require`) |
| `administer permissions` | rid 3 only | ✅ core |
| `administer users` | **rid 3 and rid 4** | ✅ core — **CE Admin genuinely administers users** |
| `administer commerce_order entities` | **rid 3 and rid 4** | ✅ Commerce 3 — **CE Admin genuinely administers orders** |

**CE Admin and Instructor are real business roles with real permission sets. Preserve both exactly.**
The three permissions with no D10 target simply cease to exist — **[F]**, not a decision to grant
something else. Confirm as **Q-A5**.

---

## 9. Seven → Claro: is Claro appropriate? **YES**

| Criterion | Assessment |
|---|---|
| **Availability** | ✅ Claro is **in Drupal 10 core** and the default admin theme since D9.5. No Composer package, no contrib dependency |
| **Nothing custom to lose** | ✅ §2.4 and §3 — Seven is stock and no custom code couples to it |
| **Lineage** | ✅ Claro is Seven's designated successor: same information architecture — vertical tabs, node-form sidebar, action links, local tasks, status messages |
| **Node forms** | ✅ `node_admin_theme = 1` means every course/video/quiz/certificate/webform form renders here. Claro keeps Seven's main-column + meta-sidebar layout that editors know |
| **Contrib admin styling** | ✅ Views, Webform, Flag, IEF ship Claro-compatible admin CSS in their D10 releases; the D7 `*.seven.css` files have D10 equivalents. `rules.ui.seven.css` is moot — Rules is not installed |
| **Support** | ✅ Claro is the only supported core admin theme in D10. **Seven was removed from core in Drupal 10** |
| **Alternatives** | `gin` — **rejected.** It is a deliberate redesign of the admin UI, adding an unapproved visual change and a dependency for no migration benefit. Retaining Seven — **impossible** |

> **Recommendation: Claro, core, default settings, no sub-theme, no custom admin CSS.**

### 9.1 Configuration mapping

| D7 | D10 | Tag |
|---|---|:--:|
| `admin_theme = "seven"` | `system.theme: admin: claro` | TR |
| `node_admin_theme = "1"` | `node.settings: use_admin_theme: true` | **[P] must be set explicitly** — omitting it silently sends every node form to the front-end theme |
| `theme_seven_settings` | *(never existed)* | — |
| `toolbar` disabled + `admin_menu` enabled | `toolbar` **enabled** + `admin_toolbar` | **TR** — see §5 |
| `overlay` disabled | removed from core | F — no change |
| `bartik` enabled | removed from D10 core; not needed | F |

---

## 10. Functionality requiring technical adaptation

| # | Item | Why | Adaptation |
|---|---|---|---|
| **A1** | **`/admin/dashboard`** + `dashboard_sidebar` / `dashboard_inactive` regions | D7 core `dashboard` module removed in D8, no successor. **5 of the 9 Seven blocks live there — and 3 of those 5 are in `dashboard_inactive`, i.e. already not rendered** | Real loss is **2 visible blocks**: "Who's new" and "Search form". Both have D10 equivalents and can be placed on an admin page. **Q-A1** |
| **A2** | **`admin_people` Panels pane** | Panels/Page Manager not carried to D10 | Rebuild as a Views page or use core `/admin/people` |
| **A3** | **`admin_menu` drop-down navigation** | No D10 port; core toolbar is flat | **Restore `admin_toolbar` to composer.json at Phase 3.2** (§5) |
| **A4** | **`course_actions_masquerade_as_user_action`** | Custom D7 action; VBO 4.x has a new action API | Rebuild as a D10 **Action plugin** in `ce_course` |
| **A5** | **`execute php code`, `bypass rules access`, `use php in custom breadcrumbs`** | No D10 target (`drupal/php` conflicted, Rules not installed) | Not reproduced — **[F]**. Confirm **Q-A5** |
| **A6** | `devel switch_user` block in `content` | `devel` is `require-dev` in D10 | Use `masquerade` ^2.2 (in `require`) — same support workflow |
| **A7** | `views_bootstrap` table style on two `/admin/*` views | Bootstrap table styling inside a **Claro** page | Switch those two displays to a core Views table style, or accept unstyled Bootstrap classes. **Q-A7** |
| **A8** | `licence-prefix-update` admin page | One-time historical batch — **not ported** (MODULE_MAPPING §6) | Audit table migrates as data; the page does not return |
| **A9** | Seven's visual appearance | Removed from D10 core | Claro. Same IA, different visual language — **unavoidable and in scope**; the hard design requirement covers the *frontend* and explicitly permits the admin theme to change |

---

## 11. Workflows to verify after the switch — all [P]

| # | Workflow | Verify |
|---|---|---|
| W1 | Create/edit **course** nodes — `field_videos`, `field_quiz`, `field_evaluation_form` | ⚠️ **17 fields exist only in the DB, in no Feature (R16)** — all must be present and saveable |
| W2 | Create/edit **video**, **quiz**, **certificate**, **webform**, **blog**, **page** nodes | `node_admin_theme` path |
| W3 | **Commerce order list / carts / order edit** | Order states render; **`checkout_complete` orders keep their non-completed state (decision 6)** |
| W4 | **Product management** | Prices, `field_video_reference` |
| W5 | **User administration** — incl. **CE Admin (rid 4)** doing it | 128 CE Admin grants intact |
| W6 | **`content_access` / `acl` per-node access tab** | ⚠️ The entitlement UI — the 194/27 classes are visible here |
| W7 | **Flag administration** | All 5 flags |
| W8 | **Webform submissions and components** | ⚠️ **component `cid = 30` is load-bearing** |
| W9 | **Views UI** — all 21 views | `views_ui` |
| W10 | **Bulk operations on `admin_people`** | All 6 actions, incl. the custom masquerade action (**A4**) |
| W11 | **`views_data_export`** — 13 displays | Same columns, same rows, same file output |
| W12 | **Permissions page** — 483 grants across 5 roles | Instructor and CE Admin sets intact |
| W13 | **Custom config pages** — referral, wistia ×2, flag-manager | Same fields, same stored values |
| W14 | **Admin navigation** | Drop-down parity via `admin_toolbar` (**A3**) |
| W15 | `/admin/dashboard` | ❌ Does not exist (**A1**) |

---

## 12. Open questions

| # | Question |
|---|---|
| **Q-A1** | `/admin/dashboard` has no D10 equivalent. Recreate an admin landing page with the 2 active blocks, or accept removal? *(3 of 5 were already inactive)* |
| **Q-A2** | Confirm **Claro** over `gin`. Claro is core and adds no dependency; `gin` is a deliberate admin redesign |
| **Q-A3** | Approve **restoring `admin_toolbar` to composer.json at Phase 3.2** to reproduce `admin_menu`'s drop-down navigation (§5, A3) |
| **Q-A4** | Confirm `node.settings.use_admin_theme = true`, matching `node_admin_theme = 1` |
| **Q-A5** | Confirm `execute php code`, `bypass rules access` and `use php in custom breadcrumbs` are simply **not reproduced** (no D10 target) |
| **Q-A6** | `ce_wistia` inherits **two** separate Wistia settings pages. Keep two, or consolidate into one? *(consolidation would change an admin workflow — needs approval)* |
| **Q-A7** | Two `/admin/*` views use `views_bootstrap` table style inside Claro. Switch to a core Views table style, or keep Bootstrap classes unstyled? |
| **Q-A8** | `bartik` and the legacy `cetc` theme are enabled but neither is default or admin. Confirm neither needs to render in D10 *(see D10_FRONTEND_MIGRATION.md Q3)* |

---

## 13. What this audit did NOT do

- No theme installed, enabled or configured. **Claro is not set as admin theme** — D10 has no site yet.
- No admin block placed. No `system.theme` or `node.settings` configuration written.
- No permission created, changed or reproduced.
- No custom admin page, form or action rebuilt.
- No D7 modification and no D7 database write. `course_actions.module` md5
  `f9913edaad4e3feb434ee201ebb2f55c`, unchanged.

---

**Read with:** D10_FRONTEND_MIGRATION.md · D10_ARCHITECTURE.md §9 · MODULE_MAPPING.md §6–§7 ·
PHASE_3_IMPLEMENTATION_PLAN.md §14 · CLAUDE.md §30, §42.

**No admin-theme work proceeds without approval of §9 and the §12 questions.**
