-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server side redirects to the frontend break when the SDK uses hash based routing #3362
Closed
2 of 4 tasks
sergei-maertens opened this issue
Aug 14, 2023
· 2 comments
· Fixed by #3574 or open-formulieren/open-forms-sdk#586
Closed
2 of 4 tasks
Server side redirects to the frontend break when the SDK uses hash based routing #3362
sergei-maertens opened this issue
Aug 14, 2023
· 2 comments
· Fixed by #3574 or open-formulieren/open-forms-sdk#586
Comments
sergei-maertens
added
bug
Something isn't working
triage
Issue needs to be validated. Remove this label if the issue considered valid.
and removed
triage
Issue needs to be validated. Remove this label if the issue considered valid.
labels
Aug 14, 2023
Refinement: confusing topic. |
Refinement: Maykin will be stakeholder on this. |
This was referenced Nov 2, 2023
Viicos
added a commit
that referenced
this issue
Nov 13, 2023
Viicos
added a commit
that referenced
this issue
Nov 13, 2023
Viicos
added a commit
that referenced
this issue
Nov 13, 2023
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 15, 2023
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 15, 2023
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 15, 2023
Viicos
added a commit
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 16, 2023
…er basepath and real pathname
Viicos
added a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
that referenced
this issue
Nov 16, 2023
Viicos
added a commit
that referenced
this issue
Nov 17, 2023
Viicos
added a commit
that referenced
this issue
Nov 17, 2023
Viicos
added a commit
that referenced
this issue
Nov 17, 2023
Viicos
added a commit
that referenced
this issue
Nov 17, 2023
Viicos
added a commit
that referenced
this issue
Nov 17, 2023
sergei-maertens
pushed a commit
to open-formulieren/open-forms-sdk
that referenced
this issue
Nov 17, 2023
The backend is now agnostic to URL routing/hash based routing - it will always redirect back to the URL that was used to start the form and provide action & action params query arguments that specify the target for the frontend. The frontend parses this action & the params and maps it to the intended client side routes, effectively decoupling implementation details between backend and frontend. Note that this requires the SDK to operate correctly in two of the tree main steps in this flow: 1. SDK must correctly derive the 'base URL' for the form, irrespective of whether hash based routing is used or not. Fragments should *not* be sent to the backend, since they are ignored anyway. 2. The backend uses the URL supplied from 1. and append the action/action params from the context of the backend action/validation that was performed. 3. The SDK must correctly interpret the action and its params and route to the appropriate part of the application. TODO: using this pattern, we can probably refactor the _start=1 flow from the backend too, this can likely be converted to _of_action=startSubmission.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Product versie / Product version
latest, 2.2.x, 2.1.x
Omschrijf het probleem / Describe the bug
The backend uses deep-links at times (submission resume, redirect back after authentication, change appointment and possible other cases) to the form on the frontend. It does this by taking
submission.form_url
and modifiying the URL with additional path segments and/or query string parameters.submission.form_url
is recorded when a submission is started and is the only way to know where the public URL of the form is.However, when you enable hash-based routing, the backend does not know this. Redirects are broken in those situations, as hash-based routing is typically used when embedding forms in a CMS where defining catch-all routes for a particular form is not (reasonably) achievable.
E.g. a form can be available on:
Possible solutions:
/stap/bar
,/afspraak-annuleren
,submission-start
etc.). This would decouple the backend from the specific routing solution AND any client-side URLsStappen om te reproduceren / Steps to reproduce
No response
Verwacht gedrag / Expected behavior
Server side redirects work in both cases.
Screen resolution
None
Device
None
OS
None
Browser
No response
Tasks
submission.form_url
The text was updated successfully, but these errors were encountered: