Navigation breaks after login when visiting a collection link
Closed this issue · 4 comments
Describe the Bug
I found an odd issue with the navigation while trying to customise it. This also happens with a clean installation and the default navigation component.
Slightly related, but not part of this bug: I also noticed the navigation constantly re-rendering when navigating between pages which makes it flicker often and is overall annoying to deal with when customising.
Link to the code that reproduces this issue
https://next-payload-3-0-test.vercel.app
Reproduction Steps
- Open a direct link to a collection in an icognito tab - simulating a first visit when not logged in (For example: /admin/collections/mycollection?limit=10)
- You'll see the login form
- After logging in, on the first load, the redirect logic seems to not work as intended as the navigation is broken, only showing one item. This does not happen when I visit /admin in an icognito tab
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Node.js v22.9.0
Binaries:
Node: 20.18.0
npm: 10.8.2
Yarn: N/A
pnpm: 9.5.0
Relevant Packages:
payload: 3.0.0-beta.117
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:12 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 10
Can you share the repo behind that host please? Couldn't log in and it would be helpful to see the exact config
@paulpopus That's the URL for your Payload 3 Demo at https://github.com/payloadcms/payload-3.0-demo - It's really just as an example, as you can do this on any install. I just tried this on a 100% fresh install via npx create-payload-app@beta -t blank
without any config changes. I think some of the redirect logic after login is broken. If I open http://localhost:3001/admin/collections/users?limit=10 in an incognito tab, I don't get redirected to that link after logging in and the navigation only shows the Media collection.
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.
🚀 This is included in version v3.0.0-beta.127