Skip to content

Duplicate Views Analysis Report

Date: 2026-02-27 (updated) Scope: v17 codebase at dbl.Progress/src/www/Views/ Focus: Conflicting naming conventions in BlockGrid and BlockList component partials


Current Status: ALL RESOLVED

All duplicate view issues identified in this report have been resolved. The data protection views, headerNews duplicate, case-sensitivity issues, and naming mismatches are all fixed.

Issue Resolution
4 data protection duplicate pairs DONE -- camelCase duplicates removed; snake_case files contain correct logic
headerNews duplicate (Shared vs Partials) DONE -- Shared version removed
TrustpilotWidget case sensitivity DONE -- renamed to trustpilotWidget.cshtml
videoPopOut case sensitivity DONE -- renamed to videoPopout.cshtml
gridelementloanboxescompletegrideditor naming mismatch DONE -- renamed to grid_element_loanboxescompletegrideditor.cshtml
gridelementsubmenu true duplicate DONE -- removed (grid_builtin_submenu.cshtml kept)
3 unique gridElement files alias verification DONE -- aliases verified, files match

Resolution History

Phase 1: Stream 5 Cleanup (commit 65aace9)

  • 4 grid_element_psdataprotection* stubs deleted
  • gridelementsubmenu.cshtml deleted (duplicate of grid_builtin_submenu.cshtml)
  • TrustpilotWidget.cshtml renamed to trustpilotWidget.cshtml
  • videoPopOut.cshtml renamed to videoPopout.cshtml
  • gridelementloanboxescompletegrideditor.cshtml renamed to grid_element_loanboxescompletegrideditor.cshtml

Phase 2: Data Protection Fix

The data protection views were initially mishandled: Stream 5 deleted the snake_case stubs (which matched DB aliases) and left the camelCase files (which had correct logic but wrong filenames). This was corrected by renaming the camelCase files to match the database aliases and merging the correct dictionary-based rendering logic into the snake_case filenames.

Phase 3: Migration Tool Fix (commit 8e384d6)

The root cause -- the migration tool creating duplicate Path A/B element types -- was fixed. Future migration runs no longer produce duplicates.


Root Cause Analysis (Reference)

How Umbraco v17 Resolves BlockGrid Component Views

Both items.cshtml (line 22) and BootstrapGrid.cshtml (line 216) resolve partials using:

var partialViewName = "blockgrid/Components/" + item.Content.ContentType.Alias;

The ContentType.Alias comes directly from the cmsContentType.alias column in the database. The partial view filename must exactly match the database alias (case-insensitive on Windows, case-sensitive on Linux).

How the Migration Tool Generates Aliases

Two distinct code paths in GridConfigurationMigrationService.cs:

Path A -- Source element type found: Preserves the original v8 alias verbatim (e.g., ctaCurves, headerNews).

Path B -- No source element type found: Creates a synthetic element type with grid_element_ prefix (e.g., grid_element_psdataprotectiondpo).

Data protection grid editors hit Path B because they were custom Angular-based grid widgets without corresponding cmsContentType entries in v8.

Three Naming Conventions in the Codebase

Convention Pattern Example Origin
snake_case grid_element_{alias} grid_element_psdataprotectiondpo Migration tool Path B (synthetic element types)
camelCase gridElement{Alias} gridElementPsdataprotectiondpo Manual hand-migration of v8 templates
all-lowercase gridelement{alias} gridelementloanboxescompletegrideditor Migration tool Path A (preserved source alias)

Unique Files (No Duplicates)

These files have no duplicates but were verified to ensure their filenames match their database aliases:

File Lines Purpose Status
gridElementLargegooglemap.cshtml 569 Large Google Map with multiple location markers DONE -- alias verified
gridElementSocialfooter.cshtml 46 Social media links in footer DONE -- alias verified
gridElementStickysocial.cshtml 41 Sticky sidebar with social links DONE -- alias verified
grid_element_loanboxescompletegrideditor.cshtml 147 Tabbed loan product interface (renamed from gridelement*) DONE -- renamed to match alias
grid_builtin_submenu.cshtml 92 Quick Links submenu (kept; gridelementsubmenu.cshtml removed) DONE
Migration documentation by Double for Progress Credit Union