Flooded with warnings in console for collection that has either group or array in v3.37.0
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:
- Init a payload blank template
- Create collection either with array or group
- 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
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
- Init a payload blank template
- Create collection with Upload functionality
- add at least 1 configuration to the
imageSizesarray - Visit the collection page, and refresh the page. The warnings will show up.
Which area(s) are affected?
- any collection with Upload functionality and
imageSizesarray - any collection with a field of type
upload, relationTo the collection defined withimageSizesarray
Env
Payload: 3.37.0
Next.js: 15.3.2
Node: 20.17.0
Having same issue
"next": "15.3.1",
"payload": "3.37.0",
Having this issue as well when updating to 3.37.
same for 3.39.1
Have the same issue, but only while using Firefox.
Same issues in 3.39.1, It happened when I added my own cell custom component to my field:
{
name: "images",
type: "relationship",
relationTo: "media",
hasMany: true,
admin: {
components: {
Cell: "/components/Application/PayloadAdmin/ProductThumbnail"
},
}
},
For me, this happens after updating to 3.38.0. It only appears in dev mode (both with and without turbopack).
No issues on 3.37.0. Issue remains on 3.39.0, 3.39.1 and 3.40.0.
The errors appear when I refresh the admin UI on a collection with array or group.
🚀 This is included in version v3.41.0
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.