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

Changed params does not trigger load function #11635

Open
stephane-vanraes opened this issue Jan 14, 2024 · 4 comments
Open

Changed params does not trigger load function #11635

stephane-vanraes opened this issue Jan 14, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@stephane-vanraes
Copy link
Contributor

Describe the bug

Somehow it seems that changing params in nested routes does not trigger the load function to run again.

Reproduction

https://www.sveltelab.dev/md97yhs52ldziep

When first loading you will get get an empty object for params, navigating through the (very complex, highly usefull) application doesn't update this object. Refreshing when on a lower level will run the load again and show the correct.

Bizarelly enough (but likely a good pointer for where the bug happens) going down the tree (/home -> /aa -> /aa/bb) does not work while going "up" works as expected (/aa/bb -> /aa -> /home)

Logs

No response

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm

Severity

blocking an upgrade

Additional Information

No response

@eltigerchino eltigerchino added the bug Something isn't working label Jan 27, 2024
@eltigerchino eltigerchino added this to the soon milestone Jan 27, 2024
@dummdidumm
Copy link
Member

Explictly listening to one of the params in the load functions, like params.level_1 fixes this. So it seems the JSON.stringify in the page and the console.log are somehow not picked up.

@benmccann
Copy link
Member

#11870 just fixed some issues with invalidation, so can you test to see if you're still having issues with 2.5.1?

@Jakeii
Copy link

Jakeii commented Jul 12, 2024

I've run into this
using svelte@4.2.18 and sveltekit@2.5.18

Even more contrived example https://www.sveltelab.dev/qly53mhr36fga7b?files=.%2Fsrc%2Froutes%2F%5Brandom%5D%2F%2Bpage.svelte

When clicking Next random string, the load function is not called nor is the page re-rendered.

@oxxxxxy
Copy link

oxxxxxy commented Aug 26, 2024

how sad it is to know i must remake routing(((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants