You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an error I have seen a lot in the console, however, this time it's completely crashing the UI. This is preventing deploying the update to production.
…ion errors and is done correctly (#11311)
## getPreferences function caching
Our `getPreferences` function used in the ui package is now wrapped in react cache, to minimize the amount of times it runs on a single request. This mimics the behavior of our other `getPreferences` function in the next package.
## getPreferences incorrect behavior
The `getPreferences` function in the next package was passing through the incorrect user slug. This would not have been noticeable in projects with just one users collection, but might break in projects with multiple users collections.
## getPreferences performance optimization
This PR adds `pagination: false` to the getPreferences payload.find() call, which will speed up the query.
## upsertPreferences transaction errors
Due to the potential of preference upsert operations running in parallel (e.g. when switching locales), this PR disables transactions in the preferences creation / update calls. This fixes the transaction errors reported in #11310
Describe the Bug
Unfortunately with the new update also brings a breaking bug in which changing locale crashes the UI entirely. The error shown is:
This is an error I have seen a lot in the console, however, this time it's completely crashing the UI. This is preventing deploying the update to production.
Link to the code that reproduces this issue
https://github.com/PP-Tom/payload-bugs
Reproduction Steps
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
The text was updated successfully, but these errors were encountered: