TL;DR
PayloadCMS v2.8.2 brings important database fixes for both MongoDB and PostgreSQL adapters, enhances plugin functionality, and improves UI styling. This maintenance release focuses on fixing critical issues with database operations while adding useful plugin features for form validation and SEO customization.
Highlight of the Release
- Fixed critical MongoDB issue that was creating duplicate documents during versioning
- Added validation for form IDs when creating submissions in the form-builder plugin
- Enhanced SEO plugin with support for interface name customization and field overrides
- Improved PostgreSQL adapter with Drizzle logging configuration support
- Fixed UI styling issues with field types and upload fields
Migration Guide
No major migration steps are required for this release as it primarily contains bug fixes and minor feature enhancements.
If you're using the MongoDB adapter and experiencing issues with duplicate documents in versions, upgrading to this release should resolve those problems automatically.
For PostgreSQL users, the new Drizzle logging configuration can be implemented as needed:
import { buildConfig } from 'payload/config';
export default buildConfig({
db: {
postgres: {
// New logging configuration options
drizzle: {
logger: true, // or custom logger configuration
}
}
}
});
For Form Builder plugin users, note that form submissions now validate the form ID, which may affect your submission process if you were previously submitting with invalid form IDs.
SEO Plugin users can now take advantage of the new interface name customization and field overrides:
import { buildConfig } from 'payload/config';
import seoPlugin from '@payloadcms/plugin-seo';
export default buildConfig({
plugins: [
seoPlugin({
// New options
interfaceName: 'CustomSEO',
fieldOverrides: {
title: {
label: 'Custom Title Label'
}
}
})
]
});
Upgrade Recommendations
This release is recommended for all users, especially those using MongoDB or PostgreSQL database adapters, as it contains important fixes for data integrity issues.
- MongoDB users should upgrade immediately to prevent duplicate document creation during versioning operations.
- PostgreSQL users will benefit from fixes related to block validation and duplicate key handling.
- Form Builder plugin users will gain improved data validation.
- SEO plugin users will benefit from enhanced customization options and bug fixes.
The upgrade process should be straightforward:
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
After upgrading, test your application thoroughly, especially database operations involving versioning, block fields, and form submissions.
Bug Fixes
MongoDB Fixes
- Fixed critical issue where MongoDB versions were creating duplicate documents
- Resolved type errors that occurred when using
transactionOptions=false
- Updated multiple methods to use options consistently
PostgreSQL Fixes
- Fixed
validateExistingBlockIsIdentical function when working with arrays
- Fixed
validateExistingBlockIsIdentical function when working with other tables
- Removed duplicate keys from responses
- Removed
_order field from array rows to prevent duplication
Plugin Fixes
- SEO Plugin: Fixed missing spread operator in URL generator function that was causing issues
UI Fixes
- Removed max-width from field-types class and correctly set it on uploads, improving the UI layout
- Fixed styling inconsistencies in the admin panel
New Features
Database Improvements
- PostgreSQL Adapter: Added support for Drizzle logging configuration, giving developers more control over database query logging
- Updated Dependencies: Updated drizzle-kit to version 0.20.5-608ae62 and drizzle-orm to the latest version
Plugin Enhancements
- Form Builder Plugin: Added validation for form ID when creating a submission, ensuring data integrity
- SEO Plugin: Added support for customizing interface names through the
interfaceName property
- SEO Plugin: Added support for field overrides, allowing for more flexible SEO field configurations
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
Database Performance
- The fix for MongoDB versions creating duplicates improves performance by preventing unnecessary document duplication
- Removing duplicate keys from PostgreSQL responses reduces payload size and improves data transfer efficiency
- The PostgreSQL adapter improvements with Drizzle logging configuration allow for better performance monitoring and debugging
UI Performance
- Styling fixes for field-types and uploads improve rendering performance and reduce layout shifts
Impact Summary
PayloadCMS v2.8.2 is primarily a maintenance release that addresses several important database-related bugs while adding a few useful features to plugins. The most significant impact is for MongoDB users who were experiencing duplicate document creation during versioning operations - this fix prevents data corruption and improves database integrity.
PostgreSQL users benefit from multiple fixes related to block validation and duplicate key handling, which improves data consistency. The addition of Drizzle logging configuration support enhances debugging capabilities for database operations.
Plugin enhancements improve the developer experience, particularly for those using the Form Builder and SEO plugins. The Form Builder plugin now validates form IDs during submission creation, preventing invalid data. The SEO plugin gains more flexibility with interface name customization and field override capabilities.
UI improvements fix styling issues with field types and uploads, creating a more consistent admin interface experience.
Overall, this release focuses on stability and quality-of-life improvements rather than introducing major new features, making it an important but low-risk upgrade for most users.
Full Release Notes
2.8.2 (2024-01-16)
Features
- db-postgres: support drizzle logging config (#4809) (371353f)
- plugin-form-builder: add validation for form ID when creating a submission (#4730)
- plugin-seo: add support for interfaceName and fieldOverrides (#4695)
Bug Fixes
- db-mongodb: mongodb versions creating duplicates (#4825) (a861311)
- db-mongodb: transactionOptions=false typeErrors (82383a5)
- db-postgres: Remove duplicate keys from response (#4747) (eb9e771)
- db-postgres: validateExistingBlockIsIdentical with arrays (3b88adc)
- db-postgres: validateExistingBlockIsIdentical with other tables (0647c87)
- plugin-seo: fix missing spread operator in URL generator function (#4723)
- removes max-width from field-types class & correctly sets it on uploads (#4829) (ee5390a)