TL;DR
PayloadCMS v3.0.0-beta.75 brings important bug fixes and new features including automatic database migrations in production, Next.js canary 104 support, and improved authentication handling. This release contains breaking changes related to authentication hydration, Next.js dependencies, and Lexical rich text HTML converters.
Highlight of the Release
- Automatic database migrations in production environments
- Support for Next.js 15.0.0-canary.104 and React 19
- Fixed authentication hydration from server
- Improved relationship and upload version tracking with localization
- Fixed custom meta icons being overwritten by default icon
Migration Guide
Upgrading to v3.0.0-beta.75
Next.js and React Dependencies
Update your dependencies to match the following versions:
"next": "15.0.0-canary.104",
"react": "^19.0.0-rc-06d0b89e-20240801",
"react-dom": "^19.0.0-rc-06d0b89e-20240801",
Authentication Hydration Changes
- Replace any imports of
HydrateClientUser with HydrateAuthProvider
- Update your component usage accordingly:
// Before
<HydrateClientUser />
// After
<HydrateAuthProvider />
Lexical HTML Converters
If you have custom Lexical HTML converters or directly call the convertLexicalNodesToHTML function, update your code to pass through the additional required props:
// Before
convertLexicalNodesToHTML(nodes, payload)
// After
convertLexicalNodesToHTML(nodes, payload, {
showHiddenFields,
draft,
overrideAccess
})
These props are available in the arguments of your HTML Converter function.
Upgrade Recommendations
This release contains several important bug fixes and features, but also includes breaking changes that require code modifications. We recommend the following approach:
-
For projects in development: Upgrade as soon as possible to benefit from the latest features and fixes.
-
For production applications: Plan a careful upgrade that includes testing the breaking changes, particularly:
- The authentication hydration changes
- Next.js and React dependency updates
- Lexical HTML converter modifications
-
Testing focus areas:
- Authentication flows and user permissions
- Rich text editor content, especially with HTML conversion
- Custom meta icons in the admin UI
- User preferences and filtering
The automatic database migrations feature is particularly valuable for production environments, but should be thoroughly tested in a staging environment first.
Bug Fixes
Authentication and User Management
- Fixed custom meta icons being overwritten by default icon
- Ensured password confirmation when creating users in admin panel
- Properly scoped preferences queries and mutations by user
- Fixed authentication hydration on dashboard and active menu item logic
- Turned off autocomplete for create first user form to prevent conflicts with autofilled credentials
Rich Text Editor
- Fixed HTML converters not respecting
overrideAccess property when populating values in local API
- Fixed Lexical upload HTML converter to properly populate upload documents
UI and Filtering
- Fixed issue when filtering by checkbox value in a different language
- Fixed SEO plugin issue with generating images from functions
Database and Versioning
- Fixed PostgreSQL snapshot migration for older Drizzle versions
- Enabled relationship and upload version tracking when localization is enabled
New Features
Automatic Database Migrations in Production
PayloadCMS now allows for running database migrations automatically in production environments. This feature streamlines deployment processes by eliminating the need for manual migration steps.
Next.js Canary 104 Support
Updated compatibility with Next.js 15.0.0-canary.104 and React 19.0.0-rc, ensuring PayloadCMS stays current with the latest framework advancements. The withPayload function has been updated to work with the new configuration format.
Exported Lexical Node Types
The rich text editor now exports serialized inline blocks and table node types, making it easier to work with these components programmatically.
PostgreSQL Snapshot Migration Support
Added support for migrating older Drizzle snapshots in PostgreSQL, ensuring smooth database schema evolution even when upgrading from older versions.
Security Updates
User Preferences Security
This release fixes a security issue where user preferences were not properly scoped, potentially allowing users to access or modify preferences that didn't belong to them. The fix ensures that all preference queries and mutations are properly scoped to the current user.
Authentication Hydration Security
Improved the security of authentication hydration from the server, ensuring that user permissions are properly initialized and maintained throughout the application.
Performance Improvements
Live Preview Improvements
The Live Preview feature now refreshes data after the subscription is ready, ensuring that users see the most up-to-date content even when entering data while the socket connection is being established. This is particularly beneficial in environments with slower connections.
Authentication Optimization
The authentication system has been optimized to allow server initialization of the AuthProvider via props, reducing unnecessary client-side hydration and improving overall performance.
Impact Summary
PayloadCMS v3.0.0-beta.75 represents a significant update with three breaking changes that require developer attention. The authentication system has been improved with better hydration from the server, fixing issues with user permissions and preferences. Database capabilities have been enhanced with automatic migrations in production and better PostgreSQL snapshot handling.
The update to Next.js 15.0.0-canary.104 and React 19 keeps PayloadCMS at the cutting edge of framework support but requires dependency updates. Rich text editing has been improved with fixes to HTML converters and additional exported node types.
Several quality-of-life improvements for content editors include fixed custom meta icons, better checkbox filtering in different languages, and improved version tracking with localization. Security has been enhanced with properly scoped user preferences and better authentication handling.
Overall, this release balances new features with important bug fixes and security improvements, though the breaking changes require careful attention during upgrade.
Full Release Notes
Features
- db-*: allows for running migrations in production automatically (#7563) (1cb1e5e)
- bump next canary to 104 and update withPayload for new config (#7541) (8d1fc6e)
- richtext-lexical: export serialized inline blocks and table node types (ffd8ea5)
Bug Fixes
- db-postgres: #7492 migrate snapshots (#7540) (46f70d9)
- plugin-seo: issue with generating image from a function (#7566) (b7e2c59)
- hydrate permissions on dashboard, fix active menu item logic (0cc7184)
- ui: fixes issue when filtering by checkbox value in a different language (#7547) (4a20a63)
- next, payload: enable relationship & upload version tracking when localization enabled (#7508) (62744e7)
- richtext-lexical: html converters not respecting overrideAccess property when populating values, in local API (c15d679)
- scopes preferences queries and mutations by user (#7534) (a422a0d)
- ensure pw confirmation when creating users in admin panel (#7535) (edaeb1e)
- custom meta icons getting overwritten by default icon (#7466) (6f35c35)
BREAKING CHANGES
-
adjusts auth hydration from server (#7545) (e905675)
Fixes #6823
Allows the server to initialize the AuthProvider via props. Renames
HydrateClientUser to HydrateAuthProvider. It now only hydrates the
permissions as the user can be set from props. Permissions can be
initialized from props, but still need to be hydrated for some pages as
access control can be specific to docs/lists etc.
- Renames exported
HydrateClientUser to HydrateAuthProvider
-
⚠️ bump next canary to 104 and update withPayload for new config (#7541) (8d1fc6e)
We are now bumping up the Next canary version to 15.0.0-canary.104 and
react and react-dom to ^19.0.0-rc-06d0b89e-20240801.
Your new dependencies should look like this:
"next": "15.0.0-canary.104",
"react": "^19.0.0-rc-06d0b89e-20240801",
"react-dom": "^19.0.0-rc-06d0b89e-20240801",
-
richtext-lexical: html converters not respecting overrideAccess property when populating values, in local API (c15d679)
Contributors