Skip to content

Flooded with warnings in console for collection that has either group or array in v3.37.0 #12377

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

Open
anyuj opened this issue May 11, 2025 · 5 comments · May be fixed by #12419 or #12421
Open

Flooded with warnings in console for collection that has either group or array in v3.37.0 #12377

anyuj opened this issue May 11, 2025 · 5 comments · May be fixed by #12419 or #12421
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@anyuj
Copy link
Contributor

anyuj commented May 11, 2025

Describe the Bug

After upgrade to 3.37.0, when you visit a collection that has array or group and refresh the page, it will spamming multiple lines of warning in the console.
Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().

Link to the code that reproduces this issue

https://github.com/anyuj/flooded-warnings

Reproduction Steps

Use the above repo or:

  1. Init a payload blank template
  2. Create collection either with array or group
  3. Visit the collection page, and refresh the page. The warnings will show up.

Which area(s) are affected? (Select all that apply)

Any collection that has either a group or an array field

Environment Info

Payload: 3.37.0
Next.js: 15.3.2
Node: 22.13.0
@anyuj anyuj added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels May 11, 2025
@github-actions github-actions bot added created-by: Contributor and removed validate-reproduction Auto-added tag on create to tell bot to check recreation URL, removed after check. labels May 11, 2025
@alexrah
Copy link
Contributor

alexrah commented May 12, 2025

Issue started when updating payload to 3.37.0
In my setup it happens on a collection with Upload functionality when the imageSizes array is defined. If I remove imageSizes altogether, the warnings disappear.

Reproduction Steps

  1. Init a payload blank template
  2. Create collection with Upload functionality
  3. add at least 1 configuration to the imageSizes array
  4. Visit the collection page, and refresh the page. The warnings will show up.

Which area(s) are affected?

  • any collection with Upload functionality and imageSizes array
  • any collection with a field of type upload, relationTo the collection defined with imageSizes array

Env

Payload: 3.37.0
Next.js: 15.3.2
Node: 20.17.0

@zegie
Copy link

zegie commented May 12, 2025

Having same issue

"next": "15.3.1",
"payload": "3.37.0",

Image

@C947326
Copy link

C947326 commented May 25, 2025

Having this issue as well when updating to 3.37.

@tuphuc
Copy link

tuphuc commented May 26, 2025

same for 3.39.1

@Amar2Kk
Copy link

Amar2Kk commented May 29, 2025

Have the same issue, but only while using Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Contributor status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
6 participants