TL;DR
Payload CMS v2.12.0 introduces custom Field and Error components for rich text editors, Norwegian translations for the SEO plugin, and fixes several critical bugs including PostgreSQL deletion issues, rich text editor problems, and image handling improvements. This release enhances developer flexibility while addressing important stability issues.
Highlight of the Release
- Custom Field and Error components for rich text editors
- Norwegian translation for the SEO plugin
- Fixed PostgreSQL deletion operations with joins
- Improved image handling for TIFF files
- Fixed number fields with hasMany and defaultValue arrays
- Multiple rich text editor improvements and bug fixes
Migration Guide
No breaking changes were introduced in this release, so no specific migration steps are required.
However, if you're using the PostgreSQL database adapter and have custom delete operations with joins, you should test these operations after upgrading to ensure they work as expected with the fixed implementation.
If you've implemented custom rich text editor components or extensions, you may want to review the changes to the rich text editors to take advantage of the new custom Field and Error component capabilities.
Upgrade Recommendations
Recommendation
This release is recommended for all users, especially those who:
- Use PostgreSQL as their database
- Work with TIFF image files
- Use rich text editors extensively
- Need Norwegian language support for the SEO plugin
- Want to customize rich text editor components
The security-related dependency updates also make this an important upgrade for production environments.
To upgrade, run:
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
After upgrading, test your application thoroughly, especially if you use the specific features that were fixed in this release.
Bug Fixes
Database Fixes
- PostgreSQL: Fixed error on delete operations having joins that could cause data integrity issues
- Transaction Handling: Fixed regression in filterOptions using different transaction contexts
Rich Text Editor Fixes
- Lexical Editor:
- Fixed generated output schema for Blocks that was not fully correct
- Fixed Link component to properly add open-in-new-tab to HTML converter
- Fixed checklist HTML converter incorrectly outputting children
- Properly centered add- and drag-block handles for better usability
- Disabled instanceof HTMLImageElement check that caused server-side issues
- Added clarification that HTML generation has to happen on the server
Other Fixes
- Fixed image resizing for TIFF files
- Fixed number fields with hasMany to correctly accept defaultValue arrays
- Set beforeValidateHook req type to required for proper TypeScript support
- Fixed documentation issues including:
- Corrected rate limit from 90000 to 900000
- Fixed typos in documentation
- Improved naming for afterForgotPassword hook example code
- Fixed broken links in documentation
New Features
Rich Text Editor Enhancements
- Custom Components: Added ability to provide custom Field and Error components for rich text editors, giving developers more flexibility in customizing the editing experience
- Norwegian Translation: Added Norwegian language support for the SEO plugin, expanding internationalization capabilities
Developer Experience Improvements
- Updated repository URLs in all package.json files for better consistency
- Improved Docker Compose configuration for CI/CD pipelines
Security Updates
Dependency Updates
Multiple security-related dependency updates were included in this release:
- Updated express from 4.18.2 to 4.19.2 across multiple examples and templates
- Updated ip package from various versions to newer versions (2.0.0 to 2.0.1, 1.1.8 to 1.1.9)
- Updated es5-ext from 0.10.62 to 0.10.64 across multiple examples and templates
- Updated follow-redirects in examples/testing
These updates address security vulnerabilities in these dependencies and should be applied as soon as possible.
Performance Improvements
Image Processing
- Improved image handling and resizing for TIFF files, which should result in better performance when working with this file format
Database Operations
- Fixed PostgreSQL deletion operations with joins, which should improve performance and reliability when deleting records with relationships
- Fixed regression in filterOptions using different transaction contexts, which should improve query performance and reliability
Impact Summary
Payload CMS v2.12.0 is a feature and bug fix release that enhances developer flexibility while addressing important stability issues. The addition of custom Field and Error components for rich text editors gives developers more control over the editing experience, while Norwegian translations for the SEO plugin improve accessibility for Norwegian users.
Critical bug fixes include resolving PostgreSQL deletion issues with joins, fixing rich text editor problems in the Lexical editor, and improving image handling for TIFF files. The release also addresses several security-related dependency updates that should be applied promptly.
This release is particularly beneficial for developers working with rich text editors, PostgreSQL databases, or requiring internationalization support. The improvements to error handling, data validation, and UI components contribute to a more stable and flexible CMS experience.
Full Release Notes
2.12.0 (2024-04-03)
Features
- plugin-seo: adds Norwegian translation (#5621) (589b492)
- richtext-*: add ability to provide custom Field and Error components (#5574) (02d2c51)
Bug Fixes
- db-postgres: error on delete having joins (#5459) (9169230)
- image resize tiff files (#5415) (8184e00)
- number field with hasMany accept defaultValue array (#5618) (a3ae416)
- regression of filterOptions using different transaction (#5169) (3ceb6ef)
- richtext-lexical: Blocks: generated output schema is not fully correct (#5259) (e7f6bfb)
- richtext-lexical: checklist html converter incorrectly outputting children (#5570) (2e5400f)
- richtext-lexical: disable instanceof HTMLImageElement check as it causes issues when used on the server (2164dcc)
- richtext-lexical: Link: add open-in-new-tab to html converter (23df60d)
- richtext-lexical: properly center add- and drag-block handles (#5568) (48dc116)
- sets beforeValidateHook req type to required (#5608) (e10d5df)