VE-6750#465
Conversation
feat: v3.2.5
feat: v3.2.5 lp sdk
ion-url-without-query-string-vb): logic for redirection improved
hiteshshetty-dev
left a comment
There was a problem hiding this comment.
Please add test cases and make pr on develop_v3 branch
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
|
Also, hash routing needs to be considered. This won't work with hash router. |
…and query string combined logic and test cases added
…view-sdk into VE-6750/redirection-url-without-query-string-vb
…view-sdk into VE-6750/redirection-url-without-query-string-vb
…ps://github.com/contentstack/live-preview-sdk into VE-6750/redirection-url-without-query-string-vb
e4adf0b to
f40a1ce
Compare
There was a problem hiding this comment.
I have one doubt, if we remove search params are we sure the user's website will not have any impact? I mean how are we making sure removing the params would not break/change the user's website.
@faraazb @hiteshshetty-dev @sairajchouhan @csAdityaPachauri
There was a problem hiding this comment.
that's a valid point, not sure removing all the query params is a good decision
There was a problem hiding this comment.
@hiteshshetty-dev @faraazb @sairajchouhan As discussed, it would be better to make changes on the VB side for this. So closing this PR
Summary
This PR fixes a bug where the "Start Editing" button would cause an "entry not found" error in the Visual Builder if the page's URL contained query parameters or a hash. The target-url is now generated using only the base path of the URL, ensuring the correct entry is always found.
Fix
The getVisualBuilderRedirectionUrl function was updated to construct the target-url using window.location.origin + window.location.pathname. This effectively strips any query parameters and hash fragments, providing a clean URL that the backend can correctly resolve.
Uploading Screen Recording 2025-07-18 at 4.41.05 PM.mov…