Skip to content

09 -- Fix Plan: DocType / DataType Duplication

Date: 2026-02-27 (updated) Scope: Element type cleanup, Path A/B duplicate resolution, orphaned type assessment


Current Status

Phase Status Detail
Phase 1: Path A/B Duplicates DONE Migration tool fixed (commits 8e384d6, 09935d2, 164069f, 76a17cf). Fresh runs produce ~430 element types instead of ~455.
Phase 2: Orphaned Content Types DEFERRED 44 types flagged. Cross-DB validation not yet run. These are safe to leave in place -- no functional impact.
Phase 3: DT 1055 Investigation DONE Article Controls Grid configuration verified. 12 content nodes migrated correctly.
Phase 4: Settings Deduplication DEFERRED 29 potential savings. GUID remapping risk too high for the cosmetic benefit.
Phase 5: Test DT 2236 DEFERRED Not checked across client databases. Low priority -- 10 element types saved if removed.

What Was Done

Phase 1: Path A/B Duplicate Resolution

Three root causes were identified and fixed in the migration tool:

Commit 09935d2: Settings editor exclusion list (gridSettingsMarginEditor, gridSettingsPaddingEditor), ps-prefix stripping in target DB lookup, case-insensitive SQL matching.

Commit 164069f: DefaultGridEditorConverter now uses grid_element_ prefix instead of gridElement, preventing Path 3 duplicates. Also skips settings editors during content migration.

Commit 76a17cf: ps-prefix stripping in FindSourceElementTypeForGridEditorAsync (source DB lookup). This was the primary fix -- searches v8 source DB where element types already exist.

Result on fresh migration: - gridSettingsMarginEditor x2, gridSettingsPaddingEditor x2 eliminated (settings editors no longer create element types) - 9 gridElement* duplicates eliminated (socialfooter, stickysocial, largegooglemap, 4 data protection, 2 settings) - grid_element_psfancyvideo correctly reuses fancyVideo instead of creating a duplicate

The 9 Original Duplicate Pairs (Reference)

Path A (in content) Path B (config only) Resolution
gridElementPsdataprotectiondpo grid_element_psdataprotectiondpo Fixed in migration tool; Path B no longer created
gridElementPsdataprotectionname grid_element_psdataprotectionname Fixed in migration tool
gridElementPsdataprotectionsummarytable grid_element_psdataprotectionsummarytable Fixed in migration tool
gridElementPsdataprotectionweare grid_element_psdataprotectionweare Fixed in migration tool
gridElementSocialfooter grid_element_socialfooter Fixed in migration tool
gridElementStickysocial grid_element_stickysocial Fixed in migration tool
gridElementLargegooglemap grid_element_largegooglemap Fixed in migration tool
gridElementGridsettingsmargineditor grid_element_gridsettingsmargineditor Both eliminated (settings editors excluded)
gridElementGridsettingspaddingeditor grid_element_gridsettingspaddingeditor Both eliminated (settings editors excluded)

Deferred Items

Phase 2: Orphaned Content Element Types (44 types)

These 44 element types are not in any BlockGrid config and not referenced by content in progresscu.ie. They are safe to leave in place.

Category A -- Nested/child types (DO NOT DELETE): These are rendered by parent element types (e.g., slider slides, calculator items, accordion items, gallery items). They are not orphaned; they are just not directly referenced in BlockGrid config.

Category B -- Possibly truly orphaned (8 types): blockListCallToAction, blockListCallToActionSettings, header, headerFull, headerFullSettings, headerSettings, googleMap, comparsionTable. Cross-DB validation is needed before removing any of these.

Phase 4: Settings Deduplication

42 settings element types (14 row + 14 cell + 14 block) could be reduced to 13. This was evaluated and deferred because:

  • GUID remapping would be required across all content data in all client databases
  • No functional benefit -- only reduces backoffice clutter by 29 items
  • Risk of content data corruption outweighs cosmetic improvement

Phase 5: Test DataType 2236

The test data type (ID 2236) produces 10 element types with no content in progresscu.ie and no document type assignment. It should be validated across all client databases before removal.


Decision Framework (Reference)

This codebase is shared across multiple credit union databases. Items with zero content in progresscu.ie may be actively used in other client databases. Never delete based on single-DB analysis.

Category Can Delete? Criteria
In-use (164) NO Content references them
Configured, no content (217) NO Shared codebase -- may have content in other DBs
Orphaned infrastructure (30) MAYBE Only if grid datatype is confirmed unused across ALL DBs
Orphaned content types (44) MAYBE Only if not a nested/child type AND confirmed unused across ALL DBs
Path A/B duplicates (9 pairs) DONE Fixed in migration tool; no longer created on fresh runs
Migration documentation by Double for Progress Credit Union