Skip to content
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

[🐞] SSR Redirect (from Action) with Query Parameter doesn't work properly. #5470

Closed
fprl opened this issue Nov 22, 2023 · 5 comments
Closed
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@fprl
Copy link
Contributor

fprl commented Nov 22, 2023

Which component is affected?

Qwik City (routing)

Describe the bug

Hi there, thanks for checking this repro. I'm facing this issue where redirecting to the same page with query params inside a routeAction is not working.

You can test this by changing the first select to "Redirect to same page" or "Redirect to test page" (where it works).

PS: This is probably related to #5342

Thanks!

Reproduction

https://github.com/fprl/qwik-formaction-redirect

Steps to reproduce

  1. npm run dev
  2. Change the first select to "Redirect to same page" or "Redirect to test page" and submit to see the difference (also check console logs).

System Info

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
    Memory: 83.69 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    Yarn: 3.6.3 - ~/.yarn/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    pnpm: 8.5.1 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 119.0.6045.159
    Safari: 17.0
  npmPackages:
    @builder.io/qwik: ^1.2.19 => 1.2.19 
    @builder.io/qwik-city: ^1.2.19 => 1.2.19 
    undici: ^5.26.0 => 5.27.2 
    vite: ^4.4.11 => 4.5.0

Additional Information

No response

@fprl fprl added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Nov 22, 2023
@wmertens
Copy link
Member

The problem is that the redirect is changed, when redirecting to /?bedrooms=%222%22 the returned value is /q-data.json?bedrooms=%222%22

Something between the routeAction and the browser does that, so either qwik-city or the service-worker

@fprl
Copy link
Contributor Author

fprl commented Nov 22, 2023

Thanks for your response, I will check Qwik repo later to see if I can isolate the issue

@fmgono
Copy link

fmgono commented Feb 11, 2024

I faced this issue also, though #5342 was already closed, I still got this weird behavior.

My Qwik Version :

{
  "@builder.io/qwik": "^1.4.0",
  "@builder.io/qwik-city": "^1.4.0",
}

@wmertens
Copy link
Member

@fmgono here are the test cases for the fix, is your situation different?

https://github.com/BuilderIO/qwik/pull/5349/files#diff-39ec843cb34bf02b43d65685129628d1ab2a7124e5ae9549d115eec4482e5adf

It would be great if you could make a reproduction on https://qwik.new

@PatrickJS
Copy link
Member

closing unless there is a reproduction with latest qwik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants