payload icon indicating copy to clipboard operation
payload copied to clipboard

Password field in Users collection appears multiple times

Open tiago-meireles opened this issue 1 year ago • 2 comments

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. image

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

tiago-meireles avatar Sep 02 '24 18:09 tiago-meireles

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.

hristokoev avatar Sep 06 '24 00:09 hristokoev

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?

paulpopus avatar Oct 09 '24 21:10 paulpopus

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: Image 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: Image Image

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.

agrippa1994 avatar Oct 22 '24 08:10 agrippa1994

Thanks for your PR @agrippa1994 we'll be merging that fix in and it will be able available in the next release!

paulpopus avatar Oct 25 '24 18:10 paulpopus

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Oct 27 '24 04:10 github-actions[bot]