Skip to content

VE-6750#465

Closed
csAdityaPachauri wants to merge 10 commits intodevelop_v3from
VE-6750/redirection-url-without-query-string-vb
Closed

VE-6750#465
csAdityaPachauri wants to merge 10 commits intodevelop_v3from
VE-6750/redirection-url-without-query-string-vb

Conversation

@csAdityaPachauri
Copy link
Copy Markdown
Contributor

@csAdityaPachauri csAdityaPachauri commented Jul 18, 2025

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…

karancs06 and others added 3 commits July 10, 2025 12:10
ion-url-without-query-string-vb): logic for redirection improved
@csAdityaPachauri csAdityaPachauri requested a review from a team as a code owner July 18, 2025 11:10
Copy link
Copy Markdown
Contributor

@hiteshshetty-dev hiteshshetty-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test cases and make pr on develop_v3 branch

@csAdityaPachauri csAdityaPachauri changed the base branch from main to develop_v3 July 18, 2025 11:22
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 18, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 71.83% 9051 / 12600
🔵 Statements 71.83% 9051 / 12600
🔵 Functions 71.68% 324 / 452
🔵 Branches 84.3% 1139 / 1351
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/visualBuilder/utils/getVisualBuilderRedirectionUrl.ts 100% 100% 100% 100%
Generated in workflow #476 for commit c0f6a83 by the Vitest Coverage Report Action

@faraazb
Copy link
Copy Markdown
Contributor

faraazb commented Jul 18, 2025

Also, hash routing needs to be considered. This won't work with hash router.

@csAdityaPachauri csAdityaPachauri marked this pull request as draft July 18, 2025 12:54
@csAdityaPachauri csAdityaPachauri marked this pull request as ready for review July 21, 2025 07:37
@csAdityaPachauri csAdityaPachauri marked this pull request as draft July 21, 2025 08:14
…view-sdk into VE-6750/redirection-url-without-query-string-vb
@csAdityaPachauri csAdityaPachauri marked this pull request as ready for review July 21, 2025 09:26
@csAdityaPachauri csAdityaPachauri force-pushed the VE-6750/redirection-url-without-query-string-vb branch from e4adf0b to f40a1ce Compare July 21, 2025 09:40
@csAdityaPachauri csAdityaPachauri marked this pull request as draft July 21, 2025 10:55
@csAdityaPachauri csAdityaPachauri marked this pull request as ready for review July 21, 2025 11:16
Copy link
Copy Markdown
Contributor

@csAyushDubey csAyushDubey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted one doubt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a valid point, not sure removing all the query params is a good decision

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiteshshetty-dev @faraazb @sairajchouhan As discussed, it would be better to make changes on the VB side for this. So closing this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants