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
fix: Recursive routing for Form route #15539
Merged
surajshetty3416
merged 2 commits into
frappe:develop
from
resilient-tech:fix-recursive-routing
Jan 18, 2022
Merged
fix: Recursive routing for Form route #15539
surajshetty3416
merged 2 commits into
frappe:develop
from
resilient-tech:fix-recursive-routing
Jan 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pruthvi145
force-pushed
the
fix-recursive-routing
branch
from
January 13, 2022 08:45
6b395c0
to
ba966df
Compare
@pruthvi145 |
Hi @hasnain2808, I updated the description for replicating this issue. Let me know if you still can not be able to replicate it. |
surajshetty3416
approved these changes
Jan 18, 2022
surajshetty3416
changed the title
fix: recursive routing for Form route
fix: Recursive routing for Form route
Jan 18, 2022
@Mergifyio backport version-13-hotfix |
mergify bot
pushed a commit
that referenced
this pull request
Jan 18, 2022
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> (cherry picked from commit 53d4ddc)
✅ Backports have been created
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
In many places, to a make new document, we just do
set_route
to/new
which eventually redirects to the actual form having local docname (e.gnew-item-1
). However, this leaves the history for/new
in browser. Now, when we try to go back fromnew-item-1
to previous page, it redirects to/new
page which again redirects to new document page/new-item-2
forming a recursive behaviour which never allows user to go back.Main cause for this is that
set_route
alwayspush
the route internally and there is no support forreplacing
the existing route.Changes
replace_route
.routes_flags
afterset_route
.formview.js
to solve mentioned issue.(This issue occurs in
Workspace
- when there is anyShortcut
hasNew
Document View)To Replicate
In ERPNext Installation...
Step 1: Change Workspace Config (temporary)
Go to Workspace List > Home
In
Shortcuts
section, Change theDocument to View
toNew
for ItemStep 2: Replicate
Item
shortcut (as shown in the above GIFs)Step 3: Reset Workspace Config
Shortcut
section, Change theDocument to View
back to unset