Description
The Obsidian Workflow Entry block updates the browser URL after each form step so the workflow is easy to copy and paste (workflowEntry.obs calls window.history.replaceState(null, "", response.data.url)). The URL it pushes is built server-side by RockBlockTypeExtensions.GetCurrentPageUrl(), which constructs the PageReference from only the page guid:
var pageReference = new Rock.Web.PageReference( block.PageCache.Guid.ToString(), parameters );
A PageReference created this way has no RouteId, so BuildUrl() falls back to the /page/{PageId} form. The visitor lands on a friendly named route (e.g. /mandated-reporter), submits the form, and watches the address bar silently change to /page/4430?WorkflowGuid=.... The URL still works — but the named route the site deliberately published is discarded, which looks broken to members and produces two competing URLs for the same page in anything they copy or bookmark.
Suggested Fix
In GetCurrentPageUrl() (Rock/Utility/ExtensionMethods/RockBlockTypeExtensions.cs), seed the PageReference with the current request's route, e.g. use block.RequestContext's page reference (PageId + RouteId) as the basis instead of constructing from the page guid alone, so BuildUrl() can emit the named route when one was used.
Actual Behavior
The rewritten URL is /page/{PageId}?WorkflowGuid=... — the named route is lost.
Expected Behavior
The rewritten URL keeps the route the visitor arrived on: /mandated-reporter?WorkflowGuid=....
Steps to Reproduce
- Create a page with a named route (e.g.
/mandated-reporter) containing an Obsidian Workflow Entry block (BlockType guid 9116AAD8-CF16-4BCE-B0CF-5B4D565710ED) pointed at any workflow type with an entry form.
- Visit the page via its named route and submit the form.
- Observe the address bar: the path changes from
/mandated-reporter to /page/{PageId}?WorkflowGuid=....
Issue Confirmation
Rock Version
17.6
Client Culture Setting
en-US
Description
The Obsidian Workflow Entry block updates the browser URL after each form step so the workflow is easy to copy and paste (
workflowEntry.obscallswindow.history.replaceState(null, "", response.data.url)). The URL it pushes is built server-side byRockBlockTypeExtensions.GetCurrentPageUrl(), which constructs thePageReferencefrom only the page guid:A
PageReferencecreated this way has noRouteId, soBuildUrl()falls back to the/page/{PageId}form. The visitor lands on a friendly named route (e.g./mandated-reporter), submits the form, and watches the address bar silently change to/page/4430?WorkflowGuid=.... The URL still works — but the named route the site deliberately published is discarded, which looks broken to members and produces two competing URLs for the same page in anything they copy or bookmark.Suggested Fix
In
GetCurrentPageUrl()(Rock/Utility/ExtensionMethods/RockBlockTypeExtensions.cs), seed thePageReferencewith the current request's route, e.g. useblock.RequestContext's page reference (PageId + RouteId) as the basis instead of constructing from the page guid alone, soBuildUrl()can emit the named route when one was used.Actual Behavior
The rewritten URL is
/page/{PageId}?WorkflowGuid=...— the named route is lost.Expected Behavior
The rewritten URL keeps the route the visitor arrived on:
/mandated-reporter?WorkflowGuid=....Steps to Reproduce
/mandated-reporter) containing an Obsidian Workflow Entry block (BlockType guid9116AAD8-CF16-4BCE-B0CF-5B4D565710ED) pointed at any workflow type with an entry form./mandated-reporterto/page/{PageId}?WorkflowGuid=....Issue Confirmation
Rock Version
17.6
Client Culture Setting
en-US