Password field in Users collection appears multiple times
Link to reproduction
No response
Environment Info
Payload: beta.96
Node.js: 20 LTS
Next.js: 15.0.0-canary.104
Describe the Bug
When accessing the details of a user in the Users Collection, the password field appears multiple times. I noticed that the number of password fields change depending on how much time the details page takes to load, but this might be a coincidence.
https://github.com/user-attachments/assets/59ad6fae-2c71-4617-8c6e-867f2ef182db
These password fields are the same element, meaning that changing the value in one changes the value in all the other occurrences.
I assume that this Password field is not supposed to be loading in this page, since the expected behaviour of the user details don't shows this field there.
Reproduction Steps
I wasn't able to find a specific scenario that I could share to replicate this scenario. I noticed that this might happens when the user detail page takes more to load, but this might be a coincidence (happens across multiple browsers). If I restart the instance, the issue is not present anymore and will progressively happen while adding content in the Admin.
Adapters and Plugins
No response
I had that issue way back in beta.55 and for the life of me couldn't figure out how or why it happened. Never happened again. I cleaned up the whole Users collection, because I had hooks and other fields, and it still behaved the same way as yours. What I think helped is the old 'turn it off and on again', so restart your server. I think this may happen if you're doing a lot of changes to your config and not restarting (usually you don't need to, but oddities happen), and I think that helped.
I don't think this is an issue any longer from my testing, can you confirm @tiago-meireles if it still happens on the latest beta please?
I have exactly the same issue on auth enabled collections. I am not sure if this is a coincidence, but it seems that the password field appears once we update the data either via GraphQL or via the local payload API.
Reproduction Steps:
In the admin UI we have this collection shown as following:
If I refresh the page multiple times, everything is still shown normally.
After we update the collection entry by using a GraphQL query, the collection shows password fields all over the place after I refresh the page:
A restart of the dev server fixes the issue temporarily. However, this issue also occurs in production.
We are currently using following versions:
Payload: beta.116
Node.js: 20 LTS
Next.js: 15.0.0-canary.173
I am not sure if this is exactly the same issue what @tiago-meireles has, but it is quite similar.
Thanks for your PR @agrippa1994 we'll be merging that fix in and it will be able available in the next release!
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.