Skip to content

Page Views admin block fails to resolve Page with IdKey. #6939

Description

@YesuCS

Description

The Page Views block (Settings > CMS > Pages > [page] > Page Views) fails to resolve the target Page with the default aIdKey, which is how Rock's own CMS Pages grid links to it by default. It only works when the raw integer Id is used instead.

  1. Hashid URL, page title falls back to generic "Page Views" and grid shows "No Page Views Found":
    https://rock.rocksolidchurchdemo.com/admin/cms/pages/k3QG1l4ebV/views
Image
  1. Same page, raw Id URL, works correctly, title shows "Internal Homepage Page Views" and grid shows records:
    https://rock.rocksolidchurchdemo.com/admin/cms/pages/12/views
Image

Actual Behavior

When navigating to the Page Views block via the IdKey URL, the block does not resolve the Page entity. The title bar shows the generic "Page Views" instead of the page name, and the grid shows "No Page Views Found" even though view records exist for that page.

Expected Behavior

The block should resolve the Page identically whether the route parameter is the raw Id or the IdKey, matching the standard entity-key resolution (int -> GUID -> IdHasher via Service.Get). The title should show the correct page name and the grid should show that page's view history in both cases.

Steps to Reproduce

  • Log into the demo site (rock.rocksolidchurchdemo.com, admin/admin) or any v19.x instance
  • Go to Settings > CMS > Pages
  • Open any page and click "Page Views" (this generates a hashid URL, e.g. /admin/cms/pages/k3QG1l4ebV/views)
  • See title stuck on generic "Page Views" and grid showing "No Page Views Found"
  • Manually edit the URL to use the page's raw Id instead of the hashid (e.g. /admin/cms/pages/12/views)
  • See the title correctly shows the page name and the grid correctly shows page view records

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug is already reported.
  • Reproduced the problem on a fresh install or on the demo site.

Rock Version

v19.1-19.2

Client Culture Setting

en-US

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions